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_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/extensions/extension_install_ui.h" | 13 #include "chrome/browser/extensions/extension_install_ui.h" |
14 #include "chrome/browser/extensions/extension_uninstall_dialog.h" | 14 #include "chrome/browser/extensions/extension_uninstall_dialog.h" |
15 #include "chrome/browser/extensions/extension_warning_set.h" | 15 #include "chrome/browser/extensions/extension_warning_set.h" |
16 #include "chrome/browser/prefs/pref_change_registrar.h" | 16 #include "chrome/browser/prefs/pref_change_registrar.h" |
17 #include "chrome/common/extensions/extension_resource.h" | 17 #include "chrome/common/extensions/extension_resource.h" |
18 #include "content/public/browser/navigation_controller.h" | 18 #include "content/public/browser/navigation_controller.h" |
19 #include "content/public/browser/notification_observer.h" | 19 #include "content/public/browser/notification_observer.h" |
20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
21 #include "content/public/browser/render_view_host.h" | 21 #include "content/public/browser/render_view_host.h" |
22 #include "content/public/browser/web_contents_observer.h" | 22 #include "content/public/browser/web_contents_observer.h" |
23 #include "content/public/browser/web_ui_message_handler.h" | 23 #include "content/public/browser/web_ui_message_handler.h" |
24 #include "googleurl/src/gurl.h" | 24 #include "googleurl/src/gurl.h" |
25 #include "ui/base/dialogs/select_file_dialog.h" | 25 #include "ui/base/dialogs/select_file_dialog.h" |
26 | 26 |
27 class ExtensionHost; | |
28 class ExtensionService; | 27 class ExtensionService; |
29 class FilePath; | 28 class FilePath; |
30 class PrefService; | 29 class PrefService; |
31 | 30 |
32 namespace base { | 31 namespace base { |
33 class DictionaryValue; | 32 class DictionaryValue; |
34 class ListValue; | 33 class ListValue; |
35 } | 34 } |
36 | 35 |
37 namespace extensions { | 36 namespace extensions { |
38 class Extension; | 37 class Extension; |
| 38 class ExtensionHost; |
39 class ManagementPolicy; | 39 class ManagementPolicy; |
40 } | 40 } |
41 | 41 |
42 // Information about a page running in an extension, for example a popup bubble, | 42 // Information about a page running in an extension, for example a popup bubble, |
43 // a background page, or a tab contents. | 43 // a background page, or a tab contents. |
44 struct ExtensionPage { | 44 struct ExtensionPage { |
45 ExtensionPage(const GURL& url, int render_process_id, int render_view_id, | 45 ExtensionPage(const GURL& url, int render_process_id, int render_view_id, |
46 bool incognito) | 46 bool incognito) |
47 : url(url), | 47 : url(url), |
48 render_process_id(render_process_id), | 48 render_process_id(render_process_id), |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 const extensions::Extension* extension, bool extension_is_enabled); | 166 const extensions::Extension* extension, bool extension_is_enabled); |
167 void GetInspectablePagesForExtensionProcess( | 167 void GetInspectablePagesForExtensionProcess( |
168 const std::set<content::RenderViewHost*>& views, | 168 const std::set<content::RenderViewHost*>& views, |
169 std::vector<ExtensionPage> *result); | 169 std::vector<ExtensionPage> *result); |
170 | 170 |
171 // Returns the ExtensionUninstallDialog object for this class, creating it if | 171 // Returns the ExtensionUninstallDialog object for this class, creating it if |
172 // needed. | 172 // needed. |
173 ExtensionUninstallDialog* GetExtensionUninstallDialog(); | 173 ExtensionUninstallDialog* GetExtensionUninstallDialog(); |
174 | 174 |
175 // Helper to inspect an ExtensionHost after it has been loaded. | 175 // Helper to inspect an ExtensionHost after it has been loaded. |
176 void InspectExtensionHost(ExtensionHost* host); | 176 void InspectExtensionHost(extensions::ExtensionHost* host); |
177 | 177 |
178 // Our model. Outlives us since it's owned by our containing profile. | 178 // Our model. Outlives us since it's owned by our containing profile. |
179 ExtensionService* extension_service_; | 179 ExtensionService* extension_service_; |
180 | 180 |
181 // A convenience member, filled once the extension_service_ is known. | 181 // A convenience member, filled once the extension_service_ is known. |
182 extensions::ManagementPolicy* management_policy_; | 182 extensions::ManagementPolicy* management_policy_; |
183 | 183 |
184 // Used to pick the directory when loading an extension. | 184 // Used to pick the directory when loading an extension. |
185 scoped_refptr<ui::SelectFileDialog> load_extension_dialog_; | 185 scoped_refptr<ui::SelectFileDialog> load_extension_dialog_; |
186 | 186 |
(...skipping 27 matching lines...) Expand all Loading... |
214 | 214 |
215 content::NotificationRegistrar registrar_; | 215 content::NotificationRegistrar registrar_; |
216 | 216 |
217 PrefChangeRegistrar pref_registrar_; | 217 PrefChangeRegistrar pref_registrar_; |
218 PrefChangeRegistrar local_state_pref_registrar_; | 218 PrefChangeRegistrar local_state_pref_registrar_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); | 220 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); |
221 }; | 221 }; |
222 | 222 |
223 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ | 223 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ |
OLD | NEW |