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

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

Issue 10388160: Only return the visible page actions from PageActionController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually fix Created 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/action_box_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/action_box_controller.h
diff --git a/chrome/browser/extensions/action_box_controller.h b/chrome/browser/extensions/action_box_controller.h
index e3415c78b0e318bd442d746f5abf23873ee1587d..e85e37e3faa723fae214b8e06a6c4f6d029389bb 100644
--- a/chrome/browser/extensions/action_box_controller.h
+++ b/chrome/browser/extensions/action_box_controller.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_EXTENSIONS_ACTION_BOX_CONTROLLER_H_
#pragma once
+#include <set>
#include <string>
#include <vector>
@@ -18,22 +19,6 @@ namespace extensions {
// Controller of the "badges" (aka "page actions") in the UI.
class ActionBoxController {
public:
- // UI decoration on a page box item.
- enum Decoration {
- DECORATION_NONE,
- };
-
- // Data about a UI badge.
- struct Data {
- // The type of decoration that should be applied to the badge.
- Decoration decoration;
-
- // The ExtensionAction that corresponds to the badge.
- ExtensionAction* action;
- };
-
- typedef std::vector<Data> DataList;
-
// The reaction that the UI should take after executing |OnClicked|.
enum Action {
ACTION_NONE,
@@ -43,8 +28,13 @@ class ActionBoxController {
virtual ~ActionBoxController() {}
- // Gets the badge data for all extensions.
- virtual scoped_ptr<DataList> GetAllBadgeData() = 0;
+ // Utility to add any actions to |out| which aren't present in |actions|.
+ static void AddMissingActions(
+ const std::set<ExtensionAction*>& actions,
+ std::vector<ExtensionAction*>* out);
+
+ // Gets the action data for all extensions.
+ virtual scoped_ptr<std::vector<ExtensionAction*> > GetCurrentActions() = 0;
// Notifies this that the badge for an extension has been clicked with some
// mouse button (1 for left, 2 for middle, and 3 for right click), and
« no previous file with comments | « no previous file | chrome/browser/extensions/action_box_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698