OLD | NEW |
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_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAGER_
H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAGER_
H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAGER_
H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAGER_
H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 UnloadedExtensionInfo::Reason reason) override; | 49 UnloadedExtensionInfo::Reason reason) override; |
50 | 50 |
51 // ExtensionActionAPI::Observer implementation. | 51 // ExtensionActionAPI::Observer implementation. |
52 void OnExtensionActionUpdated( | 52 void OnExtensionActionUpdated( |
53 ExtensionAction* extension_action, | 53 ExtensionAction* extension_action, |
54 content::WebContents* web_contents, | 54 content::WebContents* web_contents, |
55 content::BrowserContext* browser_context) override; | 55 content::BrowserContext* browser_context) override; |
56 | 56 |
57 // Causes a call to OnStatusIconClicked for the specified extension_id. | 57 // Causes a call to OnStatusIconClicked for the specified extension_id. |
58 // Returns false if no ExtensionIndicatorIcon is found for the extension. | 58 // Returns false if no ExtensionIndicatorIcon is found for the extension. |
59 bool SendClickEventToExtensionForTest(const std::string extension_id); | 59 bool SendClickEventToExtensionForTest(const std::string& extension_id); |
60 | 60 |
61 // Causes an indicator to be shown for the given extension_action. Creates | 61 // Causes an indicator to be shown for the given extension_action. Creates |
62 // the indicator if necessary. | 62 // the indicator if necessary. |
63 void CreateOrUpdateIndicator( | 63 void CreateOrUpdateIndicator( |
64 const Extension* extension, | 64 const Extension* extension, |
65 ExtensionAction* extension_action); | 65 ExtensionAction* extension_action); |
66 | 66 |
67 // Causes the indicator for the given extension to be hidden. | 67 // Causes the indicator for the given extension to be hidden. |
68 void RemoveIndicator(const std::string &extension_id); | 68 void RemoveIndicator(const std::string& extension_id); |
69 | 69 |
70 typedef std::map<const std::string, linked_ptr<ExtensionIndicatorIcon> > | 70 typedef std::map<const std::string, linked_ptr<ExtensionIndicatorIcon> > |
71 SystemIndicatorMap; | 71 SystemIndicatorMap; |
72 | 72 |
73 Profile* profile_; | 73 Profile* profile_; |
74 StatusTray* status_tray_; | 74 StatusTray* status_tray_; |
75 SystemIndicatorMap system_indicators_; | 75 SystemIndicatorMap system_indicators_; |
76 base::ThreadChecker thread_checker_; | 76 base::ThreadChecker thread_checker_; |
77 | 77 |
78 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> | 78 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> |
79 extension_action_observer_; | 79 extension_action_observer_; |
80 | 80 |
81 // Listen to extension unloaded notifications. | 81 // Listen to extension unloaded notifications. |
82 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 82 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
83 extension_registry_observer_; | 83 extension_registry_observer_; |
84 | 84 |
85 DISALLOW_COPY_AND_ASSIGN(SystemIndicatorManager); | 85 DISALLOW_COPY_AND_ASSIGN(SystemIndicatorManager); |
86 }; | 86 }; |
87 | 87 |
88 } // namespace extensions | 88 } // namespace extensions |
89 | 89 |
90 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAG
ER_H_ | 90 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAG
ER_H_ |
OLD | NEW |