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

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

Issue 12095023: Allow platform apps to add themselves to the Action Box. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 11 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_button_controller.h
diff --git a/chrome/browser/ui/toolbar/action_box_button_controller.h b/chrome/browser/ui/toolbar/action_box_button_controller.h
index 13872e08e478060a66db8bb17edc8441ad37803b..e43529ed8dfdfa14d72b08b3afaf6ddea6c5f2ad 100644
--- a/chrome/browser/ui/toolbar/action_box_button_controller.h
+++ b/chrome/browser/ui/toolbar/action_box_button_controller.h
@@ -9,11 +9,11 @@
#include <string>
#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/ui/toolbar/action_box_menu_model.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/base/models/simple_menu_model.h"
+class ActionBoxMenuModel;
class Browser;
namespace extensions {
@@ -35,7 +35,7 @@ class ActionBoxButtonController : public ui::SimpleMenuModel::Delegate,
class Delegate {
public:
// Shows the menu with the given |menu_model|.
- virtual void ShowMenu(scoped_ptr<ActionBoxMenuModel> menu_model) {}
+ virtual void ShowMenu(scoped_ptr<ActionBoxMenuModel> menu_model);
not at google - send to devlin 2013/02/01 16:39:47 is there a c++-y reason for this change? AFAIK it'
Rune Fevang 2013/02/01 22:12:54 It allows ActionBoxMenuModel to be forward declare
protected:
virtual ~Delegate() {}
@@ -60,36 +60,24 @@ class ActionBoxButtonController : public ui::SimpleMenuModel::Delegate,
// Gets the command ID for an extension, creating a new one if necessary.
int GetCommandIdForExtension(const extensions::Extension& extension);
- // Gets the extension for a command ID, or NULL if there isn't one.
- const extensions::Extension* GetExtensionForCommandId(int command_id);
+ // Returns the next command ID to be used.
+ int GetNextCommandId();
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // Handles "share with X" commands.
- void TriggerExplicitShareIntent(const GURL& share_service_url);
-
- // Handles the "Find places to share" command. Navigates the browser to the
- // web store to find extensions with share intents.
- void NavigateToWebStoreShareIntentsList();
-
Browser* browser_;
Delegate* delegate_;
- // The share service strings that have commands associated with them.
- typedef std::map<int, GURL> ShareIntentServiceCommandMap;
- ShareIntentServiceCommandMap share_intent_service_ids_;
-
- // The command ID to assign to the next extension that needs one.
- int next_extension_command_id_;
-
- // The extension IDs that have commands associated with them.
- typedef std::map<std::string, int> ExtensionIdCommandMap;
+ typedef std::map<int, std::string> ExtensionIdCommandMap;
ExtensionIdCommandMap extension_command_ids_;
+ // The command ID to assign to the next dynamic entry that needs one.
+ int next_command_id_;
+
content::NotificationRegistrar registrar_;
DISALLOW_COPY_AND_ASSIGN(ActionBoxButtonController);

Powered by Google App Engine
This is Rietveld 408576698