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

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

Issue 10695070: Implement scriptBadge.requestToAct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 ACTION_SHOW_POPUP, 25 ACTION_SHOW_POPUP,
26 ACTION_SHOW_CONTEXT_MENU, 26 ACTION_SHOW_CONTEXT_MENU,
27 ACTION_SHOW_SCRIPT_POPUP, 27 ACTION_SHOW_SCRIPT_POPUP,
28 }; 28 };
29 29
30 virtual ~LocationBarController() {} 30 virtual ~LocationBarController() {}
31 31
32 // Gets the action data for all extensions. 32 // Gets the action data for all extensions.
33 virtual std::vector<ExtensionAction*> GetCurrentActions() const = 0; 33 virtual std::vector<ExtensionAction*> GetCurrentActions() const = 0;
34 34
35 // Requests permission from the user to execute a script, due to a
36 // scriptBadge.requestToAct() call.
37 virtual void RequestScriptPermission(const std::string& extension_id) = 0;
38
35 // Notifies this that the badge for an extension has been clicked with some 39 // Notifies this that the badge for an extension has been clicked with some
36 // mouse button (1 for left, 2 for middle, and 3 for right click), and 40 // mouse button (1 for left, 2 for middle, and 3 for right click), and
37 // returns the action that should be taken in response (if any). 41 // returns the action that should be taken in response (if any).
38 // TODO(kalman): make mouse_button an enum. 42 // TODO(kalman): make mouse_button an enum.
39 virtual Action OnClicked(const std::string& extension_id, 43 virtual Action OnClicked(const std::string& extension_id,
40 int mouse_button) = 0; 44 int mouse_button) = 0;
41 45
42 // Notifies clients that the icons have changed. 46 // Notifies clients that the icons have changed.
43 virtual void NotifyChange() = 0; 47 virtual void NotifyChange() = 0;
44 }; 48 };
45 49
46 } // namespace extensions 50 } // namespace extensions
47 51
48 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 52 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698