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

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

Issue 197413002: Move extensions-related files to using //components/keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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_MENU_MANAGER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/memory/scoped_ptr.h" 16 #include "base/memory/scoped_ptr.h"
17 #include "base/memory/weak_ptr.h" 17 #include "base/memory/weak_ptr.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "chrome/browser/extensions/extension_icon_manager.h" 20 #include "chrome/browser/extensions/extension_icon_manager.h"
21 #include "components/browser_context_keyed_service/browser_context_keyed_service .h" 21 #include "components/keyed_service/core/keyed_service.h"
22 #include "content/public/browser/notification_observer.h" 22 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 23 #include "content/public/browser/notification_registrar.h"
24 #include "extensions/common/url_pattern_set.h" 24 #include "extensions/common/url_pattern_set.h"
25 25
26 26
27 class Profile; 27 class Profile;
28 class SkBitmap; 28 class SkBitmap;
29 29
30 namespace content { 30 namespace content {
31 class WebContents; 31 class WebContents;
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 260
261 // Any children this item may have. 261 // Any children this item may have.
262 List children_; 262 List children_;
263 263
264 DISALLOW_COPY_AND_ASSIGN(MenuItem); 264 DISALLOW_COPY_AND_ASSIGN(MenuItem);
265 }; 265 };
266 266
267 // This class keeps track of menu items added by extensions. 267 // This class keeps track of menu items added by extensions.
268 class MenuManager : public content::NotificationObserver, 268 class MenuManager : public content::NotificationObserver,
269 public base::SupportsWeakPtr<MenuManager>, 269 public base::SupportsWeakPtr<MenuManager>,
270 public BrowserContextKeyedService { 270 public KeyedService {
271 public: 271 public:
272 MenuManager(Profile* profile, StateStore* store_); 272 MenuManager(Profile* profile, StateStore* store_);
273 virtual ~MenuManager(); 273 virtual ~MenuManager();
274 274
275 // Convenience function to get the MenuManager for a Profile. 275 // Convenience function to get the MenuManager for a Profile.
276 static MenuManager* Get(Profile* profile); 276 static MenuManager* Get(Profile* profile);
277 277
278 // Returns the keys of extensions which have menu items registered. 278 // Returns the keys of extensions which have menu items registered.
279 std::set<MenuItem::ExtensionKey> ExtensionIds(); 279 std::set<MenuItem::ExtensionKey> ExtensionIds();
280 280
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 381
382 // Owned by ExtensionSystem. 382 // Owned by ExtensionSystem.
383 StateStore* store_; 383 StateStore* store_;
384 384
385 DISALLOW_COPY_AND_ASSIGN(MenuManager); 385 DISALLOW_COPY_AND_ASSIGN(MenuManager);
386 }; 386 };
387 387
388 } // namespace extensions 388 } // namespace extensions
389 389
390 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_ 390 #endif // CHROME_BROWSER_EXTENSIONS_MENU_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/install_tracker_factory.cc ('k') | chrome/browser/extensions/menu_manager_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698