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

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

Issue 89253002: Remove ExtensionPrefFactory's dependency on Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 7 years 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_TOOLBAR_MODEL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
11 #include "chrome/browser/extensions/extension_prefs.h" 11 #include "chrome/browser/extensions/extension_prefs.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 #include "extensions/common/extension.h" 15 #include "extensions/common/extension.h"
16 16
17 class Browser; 17 class Browser;
18 class ExtensionService; 18 class ExtensionService;
19 class PrefService; 19 class PrefService;
20 class Profile;
20 21
21 // Model for the browser actions toolbar. 22 // Model for the browser actions toolbar.
22 class ExtensionToolbarModel : public content::NotificationObserver, 23 class ExtensionToolbarModel : public content::NotificationObserver,
23 public BrowserContextKeyedService { 24 public BrowserContextKeyedService {
24 public: 25 public:
25 ExtensionToolbarModel(Profile* profile, 26 ExtensionToolbarModel(Profile* profile,
26 extensions::ExtensionPrefs* extension_prefs); 27 extensions::ExtensionPrefs* extension_prefs);
27 virtual ~ExtensionToolbarModel(); 28 virtual ~ExtensionToolbarModel();
28 29
29 // The action that should be taken as a result of clicking a browser action. 30 // The action that should be taken as a result of clicking a browser action.
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 // For observing change of toolbar order preference by external entity (sync). 159 // For observing change of toolbar order preference by external entity (sync).
159 PrefChangeRegistrar pref_change_registrar_; 160 PrefChangeRegistrar pref_change_registrar_;
160 base::Closure pref_change_callback_; 161 base::Closure pref_change_callback_;
161 162
162 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; 163 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_;
163 164
164 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); 165 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel);
165 }; 166 };
166 167
167 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ 168 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698