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

Side by Side Diff: chrome/browser/ui/webui/extensions/extension_settings_handler.h

Issue 11348165: Remove PrefObserver usages, batch 10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android Created 8 years, 1 month 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_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 "base/prefs/public/pref_change_registrar.h" 13 #include "base/prefs/public/pref_change_registrar.h"
14 #include "base/prefs/public/pref_observer.h"
15 #include "base/scoped_observer.h" 14 #include "base/scoped_observer.h"
16 #include "chrome/browser/extensions/extension_install_ui.h" 15 #include "chrome/browser/extensions/extension_install_ui.h"
17 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 16 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
18 #include "chrome/browser/extensions/extension_warning_service.h" 17 #include "chrome/browser/extensions/extension_warning_service.h"
19 #include "chrome/browser/extensions/requirements_checker.h" 18 #include "chrome/browser/extensions/requirements_checker.h"
20 #include "chrome/common/extensions/extension_resource.h" 19 #include "chrome/common/extensions/extension_resource.h"
21 #include "content/public/browser/navigation_controller.h" 20 #include "content/public/browser/navigation_controller.h"
22 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
23 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
24 #include "content/public/browser/render_view_host.h" 23 #include "content/public/browser/render_view_host.h"
(...skipping 29 matching lines...) Expand all
54 GURL url; 53 GURL url;
55 int render_process_id; 54 int render_process_id;
56 int render_view_id; 55 int render_view_id;
57 bool incognito; 56 bool incognito;
58 }; 57 };
59 58
60 // Extension Settings UI handler. 59 // Extension Settings UI handler.
61 class ExtensionSettingsHandler 60 class ExtensionSettingsHandler
62 : public content::WebUIMessageHandler, 61 : public content::WebUIMessageHandler,
63 public content::NotificationObserver, 62 public content::NotificationObserver,
64 public PrefObserver,
65 public content::WebContentsObserver, 63 public content::WebContentsObserver,
66 public ui::SelectFileDialog::Listener, 64 public ui::SelectFileDialog::Listener,
67 public ExtensionUninstallDialog::Delegate, 65 public ExtensionUninstallDialog::Delegate,
68 public extensions::ExtensionWarningService::Observer, 66 public extensions::ExtensionWarningService::Observer,
69 public base::SupportsWeakPtr<ExtensionSettingsHandler> { 67 public base::SupportsWeakPtr<ExtensionSettingsHandler> {
70 public: 68 public:
71 ExtensionSettingsHandler(); 69 ExtensionSettingsHandler();
72 virtual ~ExtensionSettingsHandler(); 70 virtual ~ExtensionSettingsHandler();
73 71
74 static void RegisterUserPrefs(PrefService* prefs); 72 static void RegisterUserPrefs(PrefService* prefs);
(...skipping 29 matching lines...) Expand all
104 int index, void* params) OVERRIDE; 102 int index, void* params) OVERRIDE;
105 virtual void MultiFilesSelected( 103 virtual void MultiFilesSelected(
106 const std::vector<FilePath>& files, void* params) OVERRIDE; 104 const std::vector<FilePath>& files, void* params) OVERRIDE;
107 virtual void FileSelectionCanceled(void* params) OVERRIDE {} 105 virtual void FileSelectionCanceled(void* params) OVERRIDE {}
108 106
109 // content::NotificationObserver implementation. 107 // content::NotificationObserver implementation.
110 virtual void Observe(int type, 108 virtual void Observe(int type,
111 const content::NotificationSource& source, 109 const content::NotificationSource& source,
112 const content::NotificationDetails& details) OVERRIDE; 110 const content::NotificationDetails& details) OVERRIDE;
113 111
114 // PrefObserver implementation.
115 virtual void OnPreferenceChanged(PrefServiceBase* service,
116 const std::string& pref_name) OVERRIDE;
117
118 // ExtensionUninstallDialog::Delegate implementation, used for receiving 112 // ExtensionUninstallDialog::Delegate implementation, used for receiving
119 // notification about uninstall confirmation dialog selections. 113 // notification about uninstall confirmation dialog selections.
120 virtual void ExtensionUninstallAccepted() OVERRIDE; 114 virtual void ExtensionUninstallAccepted() OVERRIDE;
121 virtual void ExtensionUninstallCanceled() OVERRIDE; 115 virtual void ExtensionUninstallCanceled() OVERRIDE;
122 116
123 // extensions::ExtensionWarningService::Observer implementation. 117 // extensions::ExtensionWarningService::Observer implementation.
124 virtual void ExtensionWarningsChanged() OVERRIDE; 118 virtual void ExtensionWarningsChanged() OVERRIDE;
125 119
126 // Helper method that reloads all unpacked extensions. 120 // Helper method that reloads all unpacked extensions.
127 void ReloadUnpackedExtensions(); 121 void ReloadUnpackedExtensions();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 scoped_ptr<extensions::RequirementsChecker> requirements_checker_; 236 scoped_ptr<extensions::RequirementsChecker> requirements_checker_;
243 237
244 ScopedObserver<extensions::ExtensionWarningService, 238 ScopedObserver<extensions::ExtensionWarningService,
245 extensions::ExtensionWarningService::Observer> 239 extensions::ExtensionWarningService::Observer>
246 warning_service_observer_; 240 warning_service_observer_;
247 241
248 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler); 242 DISALLOW_COPY_AND_ASSIGN(ExtensionSettingsHandler);
249 }; 243 };
250 244
251 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_ 245 #endif // CHROME_BROWSER_UI_WEBUI_EXTENSIONS_EXTENSION_SETTINGS_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698