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

Unified Diff: chrome/browser/cocoa/bookmark_bar_controller.h

Issue 164547: Mac: make save/open dialogs operate as tab-modal sheets.... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Painfully (but hopefully correctly) merged ToT. Created 11 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/bookmark_bar_controller.h
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.h b/chrome/browser/cocoa/bookmark_bar_controller.h
index 783b98c9e7c75e029ee1d560fccde7c5cf7a4875..af21245c879ed113d6d43ecccb6597e52e4fd699 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.h
+++ b/chrome/browser/cocoa/bookmark_bar_controller.h
@@ -12,6 +12,7 @@
#include "base/scoped_ptr.h"
#include "chrome/browser/cocoa/bookmark_bar_bridge.h"
#include "chrome/browser/cocoa/tab_strip_model_observer_bridge.h"
+#import "chrome/browser/cocoa/command_observer_bridge.h"
#include "webkit/glue/window_open_disposition.h"
@class BackgroundGradientView;
@@ -21,6 +22,7 @@ class BookmarkNode;
@class BookmarkBarView;
class Browser;
@protocol ToolbarCompressable;
+class CommandUpdater;
class GURL;
@class MenuButton;
class Profile;
@@ -44,7 +46,8 @@ class PrefService;
// A controller for the bookmark bar in the browser window. Handles showing
// and hiding based on the preference in the given profile.
-@interface BookmarkBarController : NSViewController<BookmarkBarFloating> {
+@interface BookmarkBarController : NSViewController<BookmarkBarFloating,
+ CommandObserverProtocol> {
@private
Browser* browser_; // weak; owned by its window
BookmarkModel* bookmarkModel_; // weak; part of the profile owned by the
@@ -70,6 +73,9 @@ class PrefService;
// Set when using fullscreen mode.
BOOL barIsEnabled_;
+ // Normally NO; YES when it should be greyed out (for tab-modal sheets).
+ BOOL barIsGreyedOut_;
+
// Bridge from Chrome-style C++ notifications (e.g. derived from
// BookmarkModelObserver)
scoped_ptr<BookmarkBarBridge> bridge_;
@@ -78,6 +84,9 @@ class PrefService;
// it's right next to us.
id<ToolbarCompressable> compressDelegate_; // weak
+ // Allows us to observe for when to grey out the bookmark bar.
+ scoped_ptr<CommandObserverBridge> commandObserver_;
+
// Delegate that can resize us.
id<ViewResizer> resizeDelegate_; // weak
@@ -98,7 +107,8 @@ class PrefService;
initialWidth:(float)initialWidth
compressDelegate:(id<ToolbarCompressable>)compressDelegate
resizeDelegate:(id<ViewResizer>)resizeDelegate
- urlDelegate:(id<BookmarkURLOpener>)urlDelegate;
+ urlDelegate:(id<BookmarkURLOpener>)urlDelegate
+ commands:(CommandUpdater*)commands;
// Returns the backdrop to the bookmark bar.
- (BackgroundGradientView*)backgroundGradientView;
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm ('k') | chrome/browser/cocoa/bookmark_bar_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698