| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ | 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ |
| 7 | 7 |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 | 9 |
| 10 #include "base/mac/scoped_nsobject.h" | 10 #include "base/mac/scoped_nsobject.h" |
| 11 | 11 |
| 12 @class BookmarkBarController; | 12 @class BookmarkBarController; |
| 13 | 13 |
| 14 namespace bookmarks { | |
| 15 const CGFloat kInitialNoItemTextFieldXOrigin = 5; | |
| 16 } | |
| 17 | |
| 18 // A simple custom NSView for the bookmark bar used to prevent clicking and | 14 // A simple custom NSView for the bookmark bar used to prevent clicking and |
| 19 // dragging from moving the browser window. | 15 // dragging from moving the browser window. |
| 20 @interface BookmarkBarView : NSView { | 16 @interface BookmarkBarView : NSView { |
| 21 @private | 17 @private |
| 22 BOOL dropIndicatorShown_; | 18 BOOL dropIndicatorShown_; |
| 23 CGFloat dropIndicatorPosition_; // x position | 19 CGFloat dropIndicatorPosition_; // x position |
| 24 | 20 |
| 25 BookmarkBarController* controller_; | 21 BookmarkBarController* controller_; |
| 26 base::scoped_nsobject<NSTextField> noItemTextField_; | 22 base::scoped_nsobject<NSTextField> noItemTextfield_; |
| 27 base::scoped_nsobject<NSButton> importBookmarksButton_; | 23 base::scoped_nsobject<NSButton> importBookmarksButton_; |
| 24 base::scoped_nsobject<NSView> noItemContainer_; |
| 28 } | 25 } |
| 29 - (NSTextField*)noItemTextField; | 26 - (NSTextField*)noItemTextfield; |
| 30 - (NSButton*)importBookmarksButton; | 27 - (NSButton*)importBookmarksButton; |
| 28 - (NSView*)noItemContainer; |
| 31 | 29 |
| 32 - (instancetype)initWithController:(BookmarkBarController*)controller | 30 - (instancetype)initWithController:(BookmarkBarController*)controller |
| 33 frame:(NSRect)frame; | 31 frame:(NSRect)frame; |
| 34 - (void)registerForNotificationsAndDraggedTypes; | 32 - (void)registerForNotificationsAndDraggedTypes; |
| 35 | 33 |
| 36 // Exposed so the controller can nil itself out. | 34 // Exposed so the controller can nil itself out. |
| 37 @property(nonatomic, assign) BookmarkBarController* controller; | 35 @property(nonatomic, assign) BookmarkBarController* controller; |
| 38 @end | 36 @end |
| 39 | 37 |
| 40 @interface BookmarkBarView() // TestingOrInternalAPI | 38 @interface BookmarkBarView() // TestingOrInternalAPI |
| 41 @property(nonatomic, readonly) BOOL dropIndicatorShown; | 39 @property(nonatomic, readonly) BOOL dropIndicatorShown; |
| 42 @property(nonatomic, readonly) CGFloat dropIndicatorPosition; | 40 @property(nonatomic, readonly) CGFloat dropIndicatorPosition; |
| 43 @end | 41 @end |
| 44 | 42 |
| 45 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ | 43 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ |
| OLD | NEW |