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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.h

Issue 1152613003: Implement sidebar support for extension action popups (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move SidebarManager to ExtensionSystem and remove notifications Created 5 years, 7 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/ui/cocoa/browser_window_cocoa.h
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.h b/chrome/browser/ui/cocoa/browser_window_cocoa.h
index 5c2b165cf00de711cfce6d45535c058e10db935b..21b8f6d59bc05fee6e97b4285115031347dbb86a 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.h
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.h
@@ -8,6 +8,7 @@
#include "base/mac/scoped_nsobject.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/extensions/extension_keybinding_registry.h"
+#include "chrome/browser/extensions/sidebar_manager_observer.h"
#include "chrome/browser/signin/signin_header_helper.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
@@ -36,6 +37,7 @@ class BrowserWindowCocoa
: public BrowserWindow,
public ExclusiveAccessContext,
public extensions::ExtensionKeybindingRegistry::Delegate,
+ public SidebarManagerObserver,
public SearchModelObserver {
public:
BrowserWindowCocoa(Browser* browser,
@@ -157,6 +159,7 @@ class BrowserWindowCocoa
int GetRenderViewHeightInsetWithDetachedBookmarkBar() override;
void ExecuteExtensionCommand(const extensions::Extension* extension,
const extensions::Command& command) override;
+
ExclusiveAccessContext* GetExclusiveAccessContext() override;
// ExclusiveAccessContext interface
@@ -179,12 +182,18 @@ class BrowserWindowCocoa
// Returns the cocoa-world BrowserWindowController
BrowserWindowController* cocoa_controller() { return controller_; }
+ // Handle SidebarManager events
+ void OnSidebarShown(content::WebContents* tab,
+ const std::string& content_id) override;
+ void OnSidebarHidden(content::WebContents* tab,
+ const std::string& content_id) override;
+
protected:
void DestroyBrowser() override;
private:
NSWindow* window() const; // Accessor for the (current) |NSWindow|.
-
+ void UpdateSidebarForContents(content::WebContents* tab_contents);
Browser* browser_; // weak, owned by controller
BrowserWindowController* controller_; // weak, owns us
base::scoped_nsobject<NSString> pending_window_title_;

Powered by Google App Engine
This is Rietveld 408576698