Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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_DATE_TIME_OPTIONS_HANDLER_H_ | |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_ | |
| 7 | |
| 8 #include "base/compiler_specific.h" | |
| 9 #include "chrome/browser/ui/webui/options/options_ui.h" | |
| 10 #include "chromeos/dbus/system_clock_client.h" | |
| 11 | |
| 12 namespace chromeos { | |
| 13 namespace options { | |
| 14 | |
| 15 // Chrome OS handler for the set date/time link in the Advanced settings page. | |
| 16 class DateTimeOptionsHandler : public ::options::OptionsPageUIHandler, | |
| 17 public SystemClockClient::Observer { | |
| 18 public: | |
| 19 DateTimeOptionsHandler(); | |
| 20 virtual ~DateTimeOptionsHandler(); | |
| 21 | |
| 22 // OptionsPageUIHandler: | |
| 23 virtual void RegisterMessages() OVERRIDE; | |
| 24 virtual void InitializeHandler() OVERRIDE; | |
| 25 virtual void InitializePage() OVERRIDE; | |
| 26 | |
| 27 private: | |
| 28 // SystemClockClient::Observer: | |
| 29 virtual void SystemClockCanSetTimeChanged(bool can_set_time) OVERRIDE; | |
| 30 | |
| 31 // Callback for the "showSetTime" message to show the set time dialog. No | |
| 32 // arguments are expected. | |
| 33 void HandleShowSetTime(const base::ListValue* args); | |
| 34 | |
| 35 // Only expose the button and dialog of the system time can be set. | |
|
michaelpg
2014/04/24 22:42:48
s/of/if
michaelpg
2014/04/25 20:05:14
Done.
| |
| 36 bool can_set_time_; | |
| 37 bool page_initialized_; | |
| 38 | |
| 39 DISALLOW_COPY_AND_ASSIGN(DateTimeOptionsHandler); | |
| 40 }; | |
| 41 | |
| 42 } // namespace options | |
| 43 } // namespace chromeos | |
| 44 | |
| 45 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_ | |
| OLD | NEW |