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

Unified Diff: chrome/browser/ui/toolbar/action_box_menu_model.h

Issue 10887029: Only show chrome2mobile in action box if it is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
Index: chrome/browser/ui/toolbar/action_box_menu_model.h
diff --git a/chrome/browser/ui/toolbar/action_box_menu_model.h b/chrome/browser/ui/toolbar/action_box_menu_model.h
index 8096e8701fb66b2ea7dca1a3444baece31f9524a..69aaa5558b614d85ca203976409ddc5e2ed2d6a3 100644
--- a/chrome/browser/ui/toolbar/action_box_menu_model.h
+++ b/chrome/browser/ui/toolbar/action_box_menu_model.h
@@ -9,10 +9,14 @@
#include "content/public/browser/notification_observer.h"
#include "chrome/browser/extensions/extension_service.h"
msw 2012/08/30 00:41:43 Remove these two extension includes with the out-o
Cait (Slow) 2012/08/30 01:33:29 Done.
+#include "chrome/browser/extensions/extension_system.h"
+#include "chrome/browser/ui/browser.h"
msw 2012/08/30 00:41:43 The Browser forward decl will suffice with the out
Cait (Slow) 2012/08/30 01:33:29 Done.
+#include "chrome/browser/ui/browser_command_controller.h"
msw 2012/08/30 00:41:43 browser_command_controller.h and browser_commands.
Cait (Slow) 2012/08/30 01:33:29 browser_commands.h is needed, browser_command_cont
#include "chrome/browser/ui/browser_commands.h"
#include "ui/base/models/simple_menu_model.h"
class Browser;
+class Profile;
msw 2012/08/30 00:41:43 Remove this forward decl with the out-of-line defi
Cait (Slow) 2012/08/30 01:33:29 Done.
namespace extensions {
class Extension;
@@ -25,8 +29,7 @@ class ActionBoxMenuModel : public ui::SimpleMenuModel,
public ui::SimpleMenuModel::Delegate,
public content::NotificationObserver {
public:
- ActionBoxMenuModel(Browser* browser,
- ExtensionService* extension_service);
+ explicit ActionBoxMenuModel(Browser* browser);
virtual ~ActionBoxMenuModel();
// Returns true if item associated with an extension.
@@ -46,7 +49,10 @@ class ActionBoxMenuModel : public ui::SimpleMenuModel,
private:
const extensions::ExtensionList& action_box_menu_items() {
msw 2012/08/30 00:41:43 This shouldn't be defined inline anymore (also nee
Cait (Slow) 2012/08/30 01:33:29 Done.
- return extension_service_->toolbar_model()->action_box_menu_items();
+ ExtensionService* extension_service =
+ extensions::ExtensionSystem::Get(browser_->profile())->
+ extension_service();
+ return extension_service->toolbar_model()->action_box_menu_items();
}
typedef std::map<int, std::string> IdToEntensionIdMap;
@@ -57,7 +63,6 @@ class ActionBoxMenuModel : public ui::SimpleMenuModel,
const content::NotificationDetails& details) OVERRIDE;
Browser* browser_;
- ExtensionService* extension_service_;
IdToEntensionIdMap id_to_extension_id_map_;

Powered by Google App Engine
This is Rietveld 408576698