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_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
| 9 #include "base/memory/weak_ptr.h" |
9 #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.
h" | 10 #include "chrome/browser/ui/webui/options/chromeos/cros_options_page_ui_handler.
h" |
10 | 11 |
11 namespace base { | 12 namespace base { |
12 class DictionaryValue; | 13 class DictionaryValue; |
13 } | 14 } |
14 | 15 |
15 // ChromeOS system options page UI handler. | 16 // ChromeOS system options page UI handler. |
16 class SystemOptionsHandler : public chromeos::CrosOptionsPageUIHandler { | 17 class SystemOptionsHandler |
| 18 : public chromeos::CrosOptionsPageUIHandler, |
| 19 public base::SupportsWeakPtr<SystemOptionsHandler> { |
17 public: | 20 public: |
18 SystemOptionsHandler(); | 21 SystemOptionsHandler(); |
19 virtual ~SystemOptionsHandler(); | 22 virtual ~SystemOptionsHandler(); |
20 | 23 |
21 // OptionsPageUIHandler implementation. | 24 // OptionsPageUIHandler implementation. |
22 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); | 25 virtual void GetLocalizedValues(base::DictionaryValue* localized_strings); |
23 virtual void Initialize(); | 26 virtual void Initialize(); |
24 | 27 |
25 virtual void RegisterMessages(); | 28 virtual void RegisterMessages(); |
26 | 29 |
27 // Called when the accessibility checkbox value is changed. | 30 // Called when the accessibility checkbox value is changed. |
28 // |args| will contain the checkbox checked state as a string | 31 // |args| will contain the checkbox checked state as a string |
29 // ("true" or "false"). | 32 // ("true" or "false"). |
30 void AccessibilityChangeCallback(const base::ListValue* args); | 33 void AccessibilityChangeCallback(const base::ListValue* args); |
31 | 34 |
32 // Called when the System configuration screen is used to adjust | 35 // Called when the System configuration screen is used to adjust |
33 // the screen brightness. | 36 // the screen brightness. |
34 // |args| will be an empty list. | 37 // |args| will be an empty list. |
35 void DecreaseScreenBrightnessCallback(const base::ListValue* args); | 38 void DecreaseScreenBrightnessCallback(const base::ListValue* args); |
36 void IncreaseScreenBrightnessCallback(const base::ListValue* args); | 39 void IncreaseScreenBrightnessCallback(const base::ListValue* args); |
37 | 40 |
| 41 // Callback for TouchpadHelper. |
| 42 void TouchpadExists(bool* exists); |
| 43 |
38 private: | 44 private: |
39 DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler); | 45 DISALLOW_COPY_AND_ASSIGN(SystemOptionsHandler); |
40 }; | 46 }; |
41 | 47 |
42 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ | 48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_SYSTEM_OPTIONS_HANDLER_H_ |
OLD | NEW |