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

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

Issue 10559054: Animate the script badges. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase, fix thing i accidentally deleted in the last rebase 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
« no previous file with comments | « no previous file | chrome/browser/extensions/page_action_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11 matching lines...) Expand all
22 // The reaction that the UI should take after executing |OnClicked|. 22 // The reaction that the UI should take after executing |OnClicked|.
23 enum Action { 23 enum Action {
24 ACTION_NONE, 24 ACTION_NONE,
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 // Utility to add any actions to |out| which aren't present in |actions|.
33 static void AddMissingActions(
34 const std::set<ExtensionAction*>& actions,
35 std::vector<ExtensionAction*>* out);
36
37 // Gets the action data for all extensions. 32 // Gets the action data for all extensions.
38 virtual std::vector<ExtensionAction*> GetCurrentActions() = 0; 33 virtual std::vector<ExtensionAction*> GetCurrentActions() const = 0;
39 34
40 // Notifies this that the badge for an extension has been clicked with some 35 // Notifies this that the badge for an extension has been clicked with some
41 // mouse button (1 for left, 2 for middle, and 3 for right click), and 36 // mouse button (1 for left, 2 for middle, and 3 for right click), and
42 // returns the action that should be taken in response (if any). 37 // returns the action that should be taken in response (if any).
43 // TODO(kalman): make mouse_button an enum. 38 // TODO(kalman): make mouse_button an enum.
44 virtual Action OnClicked(const std::string& extension_id, 39 virtual Action OnClicked(const std::string& extension_id,
45 int mouse_button) = 0; 40 int mouse_button) = 0;
46 41
47 // Notifies clients that the icons have changed. 42 // Notifies clients that the icons have changed.
48 virtual void NotifyChange() = 0; 43 virtual void NotifyChange() = 0;
49 }; 44 };
50 45
51 } // namespace extensions 46 } // namespace extensions
52 47
53 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_ 48 #endif // CHROME_BROWSER_EXTENSIONS_LOCATION_BAR_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/page_action_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698