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

Unified Diff: chrome/browser/extensions/extension_toolbar_model.h

Issue 454053005: Consolidate ExtensionToolbarModel::Action and LocationBarController::Action (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master for CQ Created 6 years, 4 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
« no previous file with comments | « chrome/browser/extensions/extension_action.h ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_toolbar_model.h
diff --git a/chrome/browser/extensions/extension_toolbar_model.h b/chrome/browser/extensions/extension_toolbar_model.h
index d44b68f648ea65b108da36faffe924f5ed75f3a3..0068b8b010eef150af433afcd1d351178713bac6 100644
--- a/chrome/browser/extensions/extension_toolbar_model.h
+++ b/chrome/browser/extensions/extension_toolbar_model.h
@@ -9,6 +9,7 @@
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
#include "base/scoped_observer.h"
+#include "chrome/browser/extensions/extension_action.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -32,15 +33,6 @@ class ExtensionToolbarModel : public content::NotificationObserver,
ExtensionToolbarModel(Profile* profile, ExtensionPrefs* extension_prefs);
virtual ~ExtensionToolbarModel();
- // The action that should be taken as a result of clicking a browser action.
- enum Action {
- ACTION_NONE,
- ACTION_SHOW_POPUP,
- // Unlike LocationBarController there is no ACTION_SHOW_CONTEXT_MENU,
- // because UI implementations tend to handle this themselves at a higher
- // level.
- };
-
// A class which is informed of changes to the model; represents the view of
// MVC. Also used for signaling view changes such as showing extension popups.
class Observer {
@@ -90,10 +82,10 @@ class ExtensionToolbarModel : public content::NotificationObserver,
// the extension should be granted page tab permissions, which is what happens
// when the user clicks the browser action, but not, for example, when the
// showPopup API is called.
- Action ExecuteBrowserAction(const Extension* extension,
- Browser* browser,
- GURL* popup_url_out,
- bool should_grant);
+ ExtensionAction::ShowAction ExecuteBrowserAction(const Extension* extension,
+ Browser* browser,
+ GURL* popup_url_out,
+ bool should_grant);
// If count == size(), this will set the visible icon count to -1, meaning
// "show all actions".
void SetVisibleIconCount(int count);
« no previous file with comments | « chrome/browser/extensions/extension_action.h ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698