Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.h

Issue 2751573002: [Mac] Refactor bookmark bar controller (Closed)
Patch Set: Revert whitespace, fix syntax after symbol rename Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
14 // A simple custom NSView for the bookmark bar used to prevent clicking and 18 // A simple custom NSView for the bookmark bar used to prevent clicking and
15 // dragging from moving the browser window. 19 // dragging from moving the browser window.
16 @interface BookmarkBarView : NSView { 20 @interface BookmarkBarView : NSView {
17 @private 21 @private
18 BOOL dropIndicatorShown_; 22 BOOL dropIndicatorShown_;
19 CGFloat dropIndicatorPosition_; // x position 23 CGFloat dropIndicatorPosition_; // x position
20 24
21 BookmarkBarController* controller_; 25 BookmarkBarController* controller_;
22 base::scoped_nsobject<NSTextField> noItemTextfield_; 26 base::scoped_nsobject<NSTextField> noItemTextField_;
23 base::scoped_nsobject<NSButton> importBookmarksButton_; 27 base::scoped_nsobject<NSButton> importBookmarksButton_;
24 base::scoped_nsobject<NSView> noItemContainer_;
25 } 28 }
26 - (NSTextField*)noItemTextfield; 29 - (NSTextField*)noItemTextField;
27 - (NSButton*)importBookmarksButton; 30 - (NSButton*)importBookmarksButton;
28 - (NSView*)noItemContainer;
29 31
30 - (instancetype)initWithController:(BookmarkBarController*)controller 32 - (instancetype)initWithController:(BookmarkBarController*)controller
31 frame:(NSRect)frame; 33 frame:(NSRect)frame;
32 - (void)registerForNotificationsAndDraggedTypes; 34 - (void)registerForNotificationsAndDraggedTypes;
33 35
34 // Exposed so the controller can nil itself out. 36 // Exposed so the controller can nil itself out.
35 @property(nonatomic, assign) BookmarkBarController* controller; 37 @property(nonatomic, assign) BookmarkBarController* controller;
36 @end 38 @end
37 39
38 @interface BookmarkBarView() // TestingOrInternalAPI 40 @interface BookmarkBarView() // TestingOrInternalAPI
39 @property(nonatomic, readonly) BOOL dropIndicatorShown; 41 @property(nonatomic, readonly) BOOL dropIndicatorShown;
40 @property(nonatomic, readonly) CGFloat dropIndicatorPosition; 42 @property(nonatomic, readonly) CGFloat dropIndicatorPosition;
41 @end 43 @end
42 44
43 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_ 45 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_VIEW_COCOA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698