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_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 "components/browser_context_keyed_service/browser_context_keyed_service
.h" | 11 #include "components/keyed_service/core/keyed_service.h" |
12 #include "content/public/browser/notification_observer.h" | 12 #include "content/public/browser/notification_observer.h" |
13 #include "content/public/browser/notification_registrar.h" | 13 #include "content/public/browser/notification_registrar.h" |
14 #include "extensions/browser/extension_prefs.h" | 14 #include "extensions/browser/extension_prefs.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 class Profile; |
21 | 21 |
22 // Model for the browser actions toolbar. | 22 // Model for the browser actions toolbar. |
23 class ExtensionToolbarModel : public content::NotificationObserver, | 23 class ExtensionToolbarModel : public content::NotificationObserver, |
24 public BrowserContextKeyedService { | 24 public KeyedService { |
25 public: | 25 public: |
26 ExtensionToolbarModel(Profile* profile, | 26 ExtensionToolbarModel(Profile* profile, |
27 extensions::ExtensionPrefs* extension_prefs); | 27 extensions::ExtensionPrefs* extension_prefs); |
28 virtual ~ExtensionToolbarModel(); | 28 virtual ~ExtensionToolbarModel(); |
29 | 29 |
30 // 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. |
31 enum Action { | 31 enum Action { |
32 ACTION_NONE, | 32 ACTION_NONE, |
33 ACTION_SHOW_POPUP, | 33 ACTION_SHOW_POPUP, |
34 // Unlike LocationBarController there is no ACTION_SHOW_CONTEXT_MENU, | 34 // Unlike LocationBarController there is no ACTION_SHOW_CONTEXT_MENU, |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // For observing change of toolbar order preference by external entity (sync). | 165 // For observing change of toolbar order preference by external entity (sync). |
166 PrefChangeRegistrar pref_change_registrar_; | 166 PrefChangeRegistrar pref_change_registrar_; |
167 base::Closure pref_change_callback_; | 167 base::Closure pref_change_callback_; |
168 | 168 |
169 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; | 169 base::WeakPtrFactory<ExtensionToolbarModel> weak_ptr_factory_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); | 171 DISALLOW_COPY_AND_ASSIGN(ExtensionToolbarModel); |
172 }; | 172 }; |
173 | 173 |
174 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ | 174 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_TOOLBAR_MODEL_H_ |
OLD | NEW |