• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // A simple custom NSView for the bookmark bar used to prevent clicking and
6 // dragging from moving the browser window.
7 
8 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
9 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
10 #pragma once
11 
12 #import <Cocoa/Cocoa.h>
13 
14 #import "chrome/browser/ui/cocoa/background_gradient_view.h"
15 
16 @class BookmarkBarController;
17 
18 @interface BookmarkBarView : BackgroundGradientView {
19  @private
20   BOOL dropIndicatorShown_;
21   CGFloat dropIndicatorPosition_;  // x position
22 
23   IBOutlet BookmarkBarController* controller_;
24   IBOutlet NSTextField* noItemTextfield_;
25   IBOutlet NSButton* importBookmarksButton_;
26   NSView* noItemContainer_;
27 }
28 - (NSTextField*)noItemTextfield;
29 - (NSButton*)importBookmarksButton;
30 - (BookmarkBarController*)controller;
31 
32 @property(nonatomic, assign) IBOutlet NSView* noItemContainer;
33 @end
34 
35 @interface BookmarkBarView()  // TestingOrInternalAPI
36 @property(nonatomic, readonly) BOOL dropIndicatorShown;
37 @property(nonatomic, readonly) CGFloat dropIndicatorPosition;
38 - (void)setController:(id)controller;
39 @end
40 
41 #endif  // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_H_
42