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

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

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 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
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_EXTENSION_ACTION_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 12 #include "components/browser_context_keyed_service/browser_context_keyed_service .h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "content/public/browser/notification_registrar.h" 14 #include "content/public/browser/notification_registrar.h"
15 15
16 class ExtensionAction; 16 class ExtensionAction;
17 class Profile; 17 class Profile;
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 class Extension; 21 class Extension;
22 22
23 // Owns the ExtensionActions associated with each extension. These actions live 23 // Owns the ExtensionActions associated with each extension. These actions live
24 // while an extension is loaded and are destroyed on unload. 24 // while an extension is loaded and are destroyed on unload.
25 class ExtensionActionManager : public ProfileKeyedService, 25 class ExtensionActionManager : public BrowserContextKeyedService,
26 public content::NotificationObserver { 26 public content::NotificationObserver {
27 public: 27 public:
28 explicit ExtensionActionManager(Profile* profile); 28 explicit ExtensionActionManager(Profile* profile);
29 virtual ~ExtensionActionManager(); 29 virtual ~ExtensionActionManager();
30 30
31 // Returns this profile's ExtensionActionManager. One instance is 31 // Returns this profile's ExtensionActionManager. One instance is
32 // shared between a profile and its incognito version. 32 // shared between a profile and its incognito version.
33 static ExtensionActionManager* Get(Profile* profile); 33 static ExtensionActionManager* Get(Profile* profile);
34 34
35 // Retrieves the page action, browser action, or script badge for |extension|. 35 // Retrieves the page action, browser action, or script badge for |extension|.
(...skipping 22 matching lines...) Expand all
58 typedef std::map<std::string, linked_ptr<ExtensionAction> > ExtIdToActionMap; 58 typedef std::map<std::string, linked_ptr<ExtensionAction> > ExtIdToActionMap;
59 mutable ExtIdToActionMap page_actions_; 59 mutable ExtIdToActionMap page_actions_;
60 mutable ExtIdToActionMap browser_actions_; 60 mutable ExtIdToActionMap browser_actions_;
61 mutable ExtIdToActionMap script_badges_; 61 mutable ExtIdToActionMap script_badges_;
62 mutable ExtIdToActionMap system_indicators_; 62 mutable ExtIdToActionMap system_indicators_;
63 }; 63 };
64 64
65 } // namespace extensions 65 } // namespace extensions
66 66
67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_MANAGER_H_ 67 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_ACTION_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698