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

Side by Side Diff: chrome/browser/extensions/action_box_controller.h

Issue 10446034: Rename ActionBoxController -> LocationBarController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_tab_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_ACTION_BOX_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_ACTION_BOX_CONTROLLER_H_
7 #pragma once
8
9 #include <set>
10 #include <string>
11 #include <vector>
12
13 #include "base/memory/scoped_ptr.h"
14
15 class ExtensionAction;
16
17 namespace extensions {
18
19 // Controller of the "badges" (aka "page actions") in the UI.
20 class ActionBoxController {
21 public:
22 // The reaction that the UI should take after executing |OnClicked|.
23 enum Action {
24 ACTION_NONE,
25 ACTION_SHOW_POPUP,
26 ACTION_SHOW_CONTEXT_MENU,
27 };
28
29 virtual ~ActionBoxController() {}
30
31 // Utility to add any actions to |out| which aren't present in |actions|.
32 static void AddMissingActions(
33 const std::set<ExtensionAction*>& actions,
34 std::vector<ExtensionAction*>* out);
35
36 // Gets the action data for all extensions.
37 virtual scoped_ptr<std::vector<ExtensionAction*> > GetCurrentActions() = 0;
38
39 // Notifies this that the badge for an extension has been clicked with some
40 // mouse button (1 for left, 2 for middle, and 3 for right click), and
41 // returns the action that should be taken in response (if any).
42 virtual Action OnClicked(const std::string& extension_id,
43 int mouse_button) = 0;
44 };
45
46 } // namespace extensions
47
48 #endif // CHROME_BROWSER_EXTENSIONS_ACTION_BOX_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698