| 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_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H
_ | 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
_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLER_H
_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | |
| 10 #include <string> | 9 #include <string> |
| 11 | 10 |
| 12 #include "base/macros.h" | 11 #include "base/macros.h" |
| 13 #include "base/memory/linked_ptr.h" | 12 #include "base/memory/linked_ptr.h" |
| 14 #include "chrome/browser/chromeos/settings/cros_settings.h" | 13 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 15 #include "chrome/browser/ui/webui/options/core_options_handler.h" | 14 #include "chrome/browser/ui/webui/options/core_options_handler.h" |
| 16 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 17 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 18 | 17 |
| 19 namespace chromeos { | 18 namespace chromeos { |
| 20 namespace options { | 19 namespace options { |
| 21 | 20 |
| 22 // CoreChromeOSOptionsHandler handles ChromeOS settings. | 21 // CoreChromeOSOptionsHandler handles ChromeOS settings. |
| 23 class CoreChromeOSOptionsHandler : public ::options::CoreOptionsHandler, | 22 class CoreChromeOSOptionsHandler : public ::options::CoreOptionsHandler, |
| 24 public content::NotificationObserver { | 23 public content::NotificationObserver { |
| 25 public: | 24 public: |
| 26 CoreChromeOSOptionsHandler(); | 25 CoreChromeOSOptionsHandler(); |
| 27 ~CoreChromeOSOptionsHandler() override; | 26 ~CoreChromeOSOptionsHandler() override; |
| 28 | 27 |
| 29 // ::CoreOptionsHandler overrides | 28 // ::CoreOptionsHandler overrides |
| 30 void RegisterMessages() override; | 29 void RegisterMessages() override; |
| 31 std::unique_ptr<base::Value> FetchPref(const std::string& pref_name) override; | 30 base::Value* FetchPref(const std::string& pref_name) override; |
| 32 void InitializeHandler() override; | 31 void InitializeHandler() override; |
| 33 void ObservePref(const std::string& pref_name) override; | 32 void ObservePref(const std::string& pref_name) override; |
| 34 void SetPref(const std::string& pref_name, | 33 void SetPref(const std::string& pref_name, |
| 35 const base::Value* value, | 34 const base::Value* value, |
| 36 const std::string& metric) override; | 35 const std::string& metric) override; |
| 37 void StopObservingPref(const std::string& path) override; | 36 void StopObservingPref(const std::string& path) override; |
| 38 std::unique_ptr<base::Value> CreateValueForPref( | 37 base::Value* CreateValueForPref( |
| 39 const std::string& pref_name, | 38 const std::string& pref_name, |
| 40 const std::string& controlling_pref_name) override; | 39 const std::string& controlling_pref_name) override; |
| 41 | 40 |
| 42 // OptionsPageUIHandler implementation. | 41 // OptionsPageUIHandler implementation. |
| 43 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 42 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
| 44 | 43 |
| 45 // content::NotificationObserver implementation. | 44 // content::NotificationObserver implementation. |
| 46 void Observe(int type, | 45 void Observe(int type, |
| 47 const content::NotificationSource& source, | 46 const content::NotificationSource& source, |
| 48 const content::NotificationDetails& details) override; | 47 const content::NotificationDetails& details) override; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 72 // Currently selected network id. | 71 // Currently selected network id. |
| 73 std::string network_guid_; | 72 std::string network_guid_; |
| 74 | 73 |
| 75 DISALLOW_COPY_AND_ASSIGN(CoreChromeOSOptionsHandler); | 74 DISALLOW_COPY_AND_ASSIGN(CoreChromeOSOptionsHandler); |
| 76 }; | 75 }; |
| 77 | 76 |
| 78 } // namespace options | 77 } // namespace options |
| 79 } // namespace chromeos | 78 } // namespace chromeos |
| 80 | 79 |
| 81 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLE
R_H_ | 80 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CORE_CHROMEOS_OPTIONS_HANDLE
R_H_ |
| OLD | NEW |