Don't show supervised user as "already on this device" while they're being imported.
[chromium-blink-merge.git] / chrome / browser / ui / webui / options / chromeos / date_time_options_handler.h
blobf0cfefb3676016c84d21541c3b8b6cacb4b034a3
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.
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_
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/webui/options/options_ui.h"
10 #include "chromeos/dbus/system_clock_client.h"
12 namespace chromeos {
13 namespace options {
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 ~DateTimeOptionsHandler() override;
22 // OptionsPageUIHandler:
23 void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
24 void InitializeHandler() override;
25 void InitializePage() override;
26 void RegisterMessages() override;
28 private:
29 // SystemClockClient::Observer:
30 void SystemClockCanSetTimeChanged(bool can_set_time) override;
32 // Callback for the "showSetTime" message to show the set time dialog. No
33 // arguments are expected.
34 void HandleShowSetTime(const base::ListValue* args);
36 // Only expose the button and dialog if the system time can be set.
37 bool can_set_time_;
38 bool page_initialized_;
40 DISALLOW_COPY_AND_ASSIGN(DateTimeOptionsHandler);
43 } // namespace options
44 } // namespace chromeos
46 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_