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

Side by Side Diff: chrome/browser/ui/webui/options/browser_options_handler.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit 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_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/prefs/public/pref_observer.h"
11 #include "chrome/browser/api/prefs/pref_member.h" 12 #include "chrome/browser/api/prefs/pref_member.h"
12 #include "chrome/browser/api/sync/profile_sync_service_observer.h" 13 #include "chrome/browser/api/sync/profile_sync_service_observer.h"
13 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h" 14 #include "chrome/browser/printing/cloud_print/cloud_print_setup_handler.h"
14 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/search_engines/template_url_service_observer.h" 16 #include "chrome/browser/search_engines/template_url_service_observer.h"
16 #include "chrome/browser/shell_integration.h" 17 #include "chrome/browser/shell_integration.h"
17 #include "chrome/browser/ui/webui/options/options_ui.h" 18 #include "chrome/browser/ui/webui/options/options_ui.h"
18 #include "ui/base/dialogs/select_file_dialog.h" 19 #include "ui/base/dialogs/select_file_dialog.h"
19 #include "ui/base/models/table_model_observer.h" 20 #include "ui/base/models/table_model_observer.h"
20 21
21 #if defined(OS_CHROMEOS) 22 #if defined(OS_CHROMEOS)
22 #include "chrome/browser/chromeos/system/pointer_device_observer.h" 23 #include "chrome/browser/chromeos/system/pointer_device_observer.h"
23 #else 24 #else
24 #include "base/prefs/public/pref_change_registrar.h" 25 #include "base/prefs/public/pref_change_registrar.h"
25 #endif // defined(OS_CHROMEOS) 26 #endif // defined(OS_CHROMEOS)
26 27
27 class AutocompleteController; 28 class AutocompleteController;
28 class CloudPrintSetupHandler; 29 class CloudPrintSetupHandler;
29 class CustomHomePagesTableModel; 30 class CustomHomePagesTableModel;
30 class TemplateURLService; 31 class TemplateURLService;
31 32
32 namespace options { 33 namespace options {
33 34
34 // Chrome browser options page UI handler. 35 // Chrome browser options page UI handler.
35 class BrowserOptionsHandler 36 class BrowserOptionsHandler
36 : public OptionsPageUIHandler, 37 : public OptionsPageUIHandler,
37 public CloudPrintSetupHandlerDelegate, 38 public CloudPrintSetupHandlerDelegate,
39 public PrefObserver,
38 public ProfileSyncServiceObserver, 40 public ProfileSyncServiceObserver,
39 public ui::SelectFileDialog::Listener, 41 public ui::SelectFileDialog::Listener,
40 public ShellIntegration::DefaultWebClientObserver, 42 public ShellIntegration::DefaultWebClientObserver,
41 #if defined(OS_CHROMEOS) 43 #if defined(OS_CHROMEOS)
42 public chromeos::system::PointerDeviceObserver::Observer, 44 public chromeos::system::PointerDeviceObserver::Observer,
43 #endif 45 #endif
44 public TemplateURLServiceObserver { 46 public TemplateURLServiceObserver {
45 public: 47 public:
46 BrowserOptionsHandler(); 48 BrowserOptionsHandler();
47 virtual ~BrowserOptionsHandler(); 49 virtual ~BrowserOptionsHandler();
(...skipping 19 matching lines...) Expand all
67 // Create a Windows' profile specific desktop shortcut. 69 // Create a Windows' profile specific desktop shortcut.
68 static void CreateDesktopShortcutForProfile( 70 static void CreateDesktopShortcutForProfile(
69 Profile* profile, Profile::CreateStatus status); 71 Profile* profile, Profile::CreateStatus status);
70 72
71 private: 73 private:
72 // content::NotificationObserver implementation. 74 // content::NotificationObserver implementation.
73 virtual void Observe(int type, 75 virtual void Observe(int type,
74 const content::NotificationSource& source, 76 const content::NotificationSource& source,
75 const content::NotificationDetails& details) OVERRIDE; 77 const content::NotificationDetails& details) OVERRIDE;
76 78
79 // PrefObserver implementation.
80 virtual void OnPreferenceChanged(PrefServiceBase* service,
81 const std::string& pref_name) OVERRIDE;
82
77 // SelectFileDialog::Listener implementation 83 // SelectFileDialog::Listener implementation
78 virtual void FileSelected(const FilePath& path, 84 virtual void FileSelected(const FilePath& path,
79 int index, 85 int index,
80 void* params) OVERRIDE; 86 void* params) OVERRIDE;
81 87
82 // CloudPrintSetupHandler::Delegate implementation. 88 // CloudPrintSetupHandler::Delegate implementation.
83 virtual void OnCloudPrintSetupClosed() OVERRIDE; 89 virtual void OnCloudPrintSetupClosed() OVERRIDE;
84 90
85 #if defined(OS_CHROMEOS) 91 #if defined(OS_CHROMEOS)
86 // PointerDeviceObserver::Observer implementation. 92 // PointerDeviceObserver::Observer implementation.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 #if !defined(OS_CHROMEOS) 303 #if !defined(OS_CHROMEOS)
298 PrefChangeRegistrar proxy_prefs_; 304 PrefChangeRegistrar proxy_prefs_;
299 #endif // !defined(OS_CHROMEOS) 305 #endif // !defined(OS_CHROMEOS)
300 306
301 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler); 307 DISALLOW_COPY_AND_ASSIGN(BrowserOptionsHandler);
302 }; 308 };
303 309
304 } // namespace options 310 } // namespace options
305 311
306 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_ 312 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_BROWSER_OPTIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_resource_cache_android.cc ('k') | chrome/browser/ui/webui/options/browser_options_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698