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

Unified Diff: chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h

Issue 703443002: Move more extension action cocoa logic into the platform delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dc_toolbar_abstract_extension_action
Patch Set: Created 6 years, 1 month 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/extensions/extension_action_platform_delegate_cocoa.h
diff --git a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h
index ce2d153cacc94b83d219a502d73f7a921b2d546f..2913647da68f5f44b74e031010539e65fe9ec23f 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h
+++ b/chrome/browser/ui/cocoa/extensions/extension_action_platform_delegate_cocoa.h
@@ -5,14 +5,19 @@
#ifndef CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_COCOA_H_
#define CHROME_BROWSER_UI_COCOA_EXTENSIONS_EXTENSION_ACTION_PLATFORM_DELEGATE_COCOA_H_
+#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/extensions/extension_action_platform_delegate.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+@class ExtensionActionContextMenuController;
@class ExtensionPopupController;
class ToolbarActionViewDelegateCocoa;
// The cocoa-specific implementation for ExtensionActionPlatformDelegate.
class ExtensionActionPlatformDelegateCocoa
- : public ExtensionActionPlatformDelegate {
+ : public ExtensionActionPlatformDelegate,
+ public content::NotificationObserver {
public:
ExtensionActionPlatformDelegateCocoa(
ExtensionActionViewController* controller);
@@ -32,14 +37,25 @@ class ExtensionActionPlatformDelegateCocoa
const GURL& popup_url,
bool grant_tab_permissions) override;
+ // content::NotificationObserver:
+ void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) override;
+
// Returns the popup shown by this extension action, if one exists.
ExtensionPopupController* GetPopup() const;
// Returns the delegate in its cocoa implementation.
ToolbarActionViewDelegateCocoa* GetDelegateCocoa();
+ // The main controller for this extension action.
ExtensionActionViewController* controller_;
+ // The context menu controller for the extension action, if any.
+ base::scoped_nsobject<ExtensionActionContextMenuController> menuController_;
+
+ content::NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionActionPlatformDelegateCocoa);
};

Powered by Google App Engine
This is Rietveld 408576698