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

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

Issue 1203713002: Limit access to ChromeBookmarkClient to bookmarks code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_bookmark_client
Patch Set: Rebase Created 5 years, 6 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <map> 9 #include <map>
10 10
11 #import "base/mac/cocoa_protocols.h" 11 #import "base/mac/cocoa_protocols.h"
12 #include "base/mac/scoped_nsobject.h" 12 #include "base/mac/scoped_nsobject.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h" 14 #include "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_bridge.h"
15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h" 15 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h"
16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h" 16 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_state.h"
17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h" 17 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view.h"
18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h" 18 #import "chrome/browser/ui/cocoa/bookmarks/bookmark_button.h"
19 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h" 19 #include "chrome/browser/ui/cocoa/tabs/tab_strip_model_observer_bridge.h"
20 #include "ui/base/window_open_disposition.h" 20 #include "ui/base/window_open_disposition.h"
21 21
22 @class BookmarkBarController; 22 @class BookmarkBarController;
23 @class BookmarkBarFolderController; 23 @class BookmarkBarFolderController;
24 @class BookmarkBarView; 24 @class BookmarkBarView;
25 @class BookmarkButtonCell; 25 @class BookmarkButtonCell;
26 @class BookmarkFolderTarget; 26 @class BookmarkFolderTarget;
27 @class BookmarkContextMenuCocoaController; 27 @class BookmarkContextMenuCocoaController;
28 class Browser; 28 class Browser;
29 class ChromeBookmarkClient;
30 class GURL; 29 class GURL;
31 namespace ui { 30 namespace ui {
32 class ThemeProvider; 31 class ThemeProvider;
33 } 32 }
34 33
35 namespace bookmarks { 34 namespace bookmarks {
36 35
37 class BookmarkModel; 36 class BookmarkModel;
38 class BookmarkNode; 37 class BookmarkNode;
39 38
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 165
167 // The "original" state of the bookmark bar if an animation is running. 166 // The "original" state of the bookmark bar if an animation is running.
168 BookmarkBar::State lastState_; 167 BookmarkBar::State lastState_;
169 168
170 // YES if an animation is running. 169 // YES if an animation is running.
171 BOOL isAnimationRunning_; 170 BOOL isAnimationRunning_;
172 171
173 Browser* browser_; // weak; owned by its window 172 Browser* browser_; // weak; owned by its window
174 bookmarks::BookmarkModel* bookmarkModel_; // weak; part of the profile owned 173 bookmarks::BookmarkModel* bookmarkModel_; // weak; part of the profile owned
175 // by the top-level Browser object. 174 // by the top-level Browser object.
176 ChromeBookmarkClient* bookmarkClient_;
177 175
178 // Our initial view width, which is applied in awakeFromNib. 176 // Our initial view width, which is applied in awakeFromNib.
179 CGFloat initialWidth_; 177 CGFloat initialWidth_;
180 178
181 // BookmarkNodes have a 64bit id. NSMenuItems have a 32bit tag used 179 // BookmarkNodes have a 64bit id. NSMenuItems have a 32bit tag used
182 // to represent the bookmark node they refer to. This map provides 180 // to represent the bookmark node they refer to. This map provides
183 // a mapping from one to the other, so we can properly identify the 181 // a mapping from one to the other, so we can properly identify the
184 // node from the item. When adding items in, we start with seedId_. 182 // node from the item. When adding items in, we start with seedId_.
185 int32 seedId_; 183 int32 seedId_;
186 std::map<int32,int64> menuTagMap_; 184 std::map<int32,int64> menuTagMap_;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point; 420 - (BookmarkButton*)buttonForDroppingOnAtPoint:(NSPoint)point;
423 - (BOOL)isEventAnExitEvent:(NSEvent*)event; 421 - (BOOL)isEventAnExitEvent:(NSEvent*)event;
424 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX; 422 - (BOOL)shrinkOrHideView:(NSView*)view forMaxX:(CGFloat)maxViewX;
425 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node; 423 - (void)unhighlightBookmark:(const bookmarks::BookmarkNode*)node;
426 424
427 // The following are for testing purposes only and are not used internally. 425 // The following are for testing purposes only and are not used internally.
428 - (NSMenu *)menuForFolderNode:(const bookmarks::BookmarkNode*)node; 426 - (NSMenu *)menuForFolderNode:(const bookmarks::BookmarkNode*)node;
429 @end 427 @end
430 428
431 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_ 429 #endif // CHROME_BROWSER_UI_COCOA_BOOKMARKS_BOOKMARK_BAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698