| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 // Extension Settings UI handler. | 49 // Extension Settings UI handler. |
| 50 class ExtensionSettingsHandler : public OptionsPageUIHandler, | 50 class ExtensionSettingsHandler : public OptionsPageUIHandler, |
| 51 public SelectFileDialog::Listener, | 51 public SelectFileDialog::Listener, |
| 52 public ExtensionUninstallDialog::Delegate { | 52 public ExtensionUninstallDialog::Delegate { |
| 53 public: | 53 public: |
| 54 ExtensionSettingsHandler(); | 54 ExtensionSettingsHandler(); |
| 55 virtual ~ExtensionSettingsHandler(); | 55 virtual ~ExtensionSettingsHandler(); |
| 56 | 56 |
| 57 static void RegisterUserPrefs(PrefService* prefs); |
| 58 |
| 57 // Extension Detail JSON Struct for page. (static for ease of testing). | 59 // Extension Detail JSON Struct for page. (static for ease of testing). |
| 58 // Note: service can be NULL in unit tests. | 60 // Note: service can be NULL in unit tests. |
| 59 static base::DictionaryValue* CreateExtensionDetailValue( | 61 static base::DictionaryValue* CreateExtensionDetailValue( |
| 60 ExtensionService* service, | 62 ExtensionService* service, |
| 61 const Extension* extension, | 63 const Extension* extension, |
| 62 const std::vector<ExtensionPage>& pages, | 64 const std::vector<ExtensionPage>& pages, |
| 63 bool enabled, | 65 bool enabled, |
| 64 bool terminated); | 66 bool terminated); |
| 65 | 67 |
| 66 // ContentScript JSON Struct for page. (static for ease of testing). | 68 // ContentScript JSON Struct for page. (static for ease of testing). |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 // We want to register for notifications only after we've responded at least | 190 // We want to register for notifications only after we've responded at least |
| 189 // once to the page, otherwise we'd be calling javacsript functions on objects | 191 // once to the page, otherwise we'd be calling javacsript functions on objects |
| 190 // that don't exist yet when notifications come in. This variable makes sure | 192 // that don't exist yet when notifications come in. This variable makes sure |
| 191 // we do so only once. | 193 // we do so only once. |
| 192 bool registered_for_notifications_; | 194 bool registered_for_notifications_; |
| 193 | 195 |
| 194 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); | 196 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); |
| 195 }; | 197 }; |
| 196 | 198 |
| 197 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ | 199 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_EXTENSION_SETTINGS_HANDLER_H_ |
| OLD | NEW |