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

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

Issue 9814030: get rid of old options pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 months 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H _
7 #pragma once
8
9 #include "base/compiler_specific.h"
10 #include "base/memory/weak_ptr.h"
11 #include "chrome/browser/ui/webui/options/core_options_handler.h"
12
13 class PrefSetObserver;
14
15 namespace chromeos {
16
17 // CoreChromeOSOptionsHandler handles ChromeOS settings.
18 class CoreChromeOSOptionsHandler : public CoreOptionsHandler {
19 public:
20 CoreChromeOSOptionsHandler();
21 virtual ~CoreChromeOSOptionsHandler();
22
23 // ::CoreOptionsHandler overrides
24 virtual void InitializeHandler() OVERRIDE;
25 virtual base::Value* FetchPref(const std::string& pref_name) OVERRIDE;
26 virtual void ObservePref(const std::string& pref_name) OVERRIDE;
27 virtual void SetPref(const std::string& pref_name,
28 const base::Value* value,
29 const std::string& metric) OVERRIDE;
30 virtual void StopObservingPref(const std::string& path) OVERRIDE;
31
32 protected:
33 // content::NotificationObserver implementation.
34 virtual void Observe(int type,
35 const content::NotificationSource& source,
36 const content::NotificationDetails& details) OVERRIDE;
37
38 private:
39 // Notifies registered JS callbacks on ChromeOS setting change.
40 void NotifySettingsChanged(const std::string* setting_name);
41 void NotifyProxyPrefsChanged();
42
43 // Keeps the track of change caused by the handler to make sure
44 // it does not signal itself again.
45 bool handling_change_;
46
47 scoped_ptr<PrefSetObserver> proxy_prefs_;
48 base::WeakPtrFactory<CoreChromeOSOptionsHandler> pointer_factory_;
49 };
50
51 } // namespace chromeos
52
53 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698