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

Side by Side Diff: chrome/browser/extensions/api/system_indicator/system_indicator_manager.h

Issue 885443004: [Extensions] Cache extension action icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/api/system_indicator/system_indicator_manager.cc » ('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_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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 content::BrowserContext* browser_context) override; 54 content::BrowserContext* browser_context) override;
55 55
56 // Causes a call to OnStatusIconClicked for the specified extension_id. 56 // Causes a call to OnStatusIconClicked for the specified extension_id.
57 // Returns false if no ExtensionIndicatorIcon is found for the extension. 57 // Returns false if no ExtensionIndicatorIcon is found for the extension.
58 bool SendClickEventToExtensionForTest(const std::string extension_id); 58 bool SendClickEventToExtensionForTest(const std::string extension_id);
59 59
60 // Causes an indicator to be shown for the given extension_action. Creates 60 // Causes an indicator to be shown for the given extension_action. Creates
61 // the indicator if necessary. 61 // the indicator if necessary.
62 void CreateOrUpdateIndicator( 62 void CreateOrUpdateIndicator(
63 const Extension* extension, 63 const Extension* extension,
64 const ExtensionAction* extension_action); 64 ExtensionAction* extension_action);
65 65
66 // Causes the indicator for the given extension to be hidden. 66 // Causes the indicator for the given extension to be hidden.
67 void RemoveIndicator(const std::string &extension_id); 67 void RemoveIndicator(const std::string &extension_id);
68 68
69 typedef std::map<const std::string, linked_ptr<ExtensionIndicatorIcon> > 69 typedef std::map<const std::string, linked_ptr<ExtensionIndicatorIcon> >
70 SystemIndicatorMap; 70 SystemIndicatorMap;
71 71
72 Profile* profile_; 72 Profile* profile_;
73 StatusTray* status_tray_; 73 StatusTray* status_tray_;
74 SystemIndicatorMap system_indicators_; 74 SystemIndicatorMap system_indicators_;
75 base::ThreadChecker thread_checker_; 75 base::ThreadChecker thread_checker_;
76 76
77 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer> 77 ScopedObserver<ExtensionActionAPI, ExtensionActionAPI::Observer>
78 extension_action_observer_; 78 extension_action_observer_;
79 79
80 // Listen to extension unloaded notifications. 80 // Listen to extension unloaded notifications.
81 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> 81 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
82 extension_registry_observer_; 82 extension_registry_observer_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(SystemIndicatorManager); 84 DISALLOW_COPY_AND_ASSIGN(SystemIndicatorManager);
85 }; 85 };
86 86
87 } // namespace extensions 87 } // namespace extensions
88 88
89 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAG ER_H_ 89 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_INDICATOR_SYSTEM_INDICATOR_MANAG ER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/system_indicator/system_indicator_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698