| Index: chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h
|
| diff --git a/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h b/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a53f2c11da025cfbbcddc2a98107fcf55f2c5046
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h
|
| @@ -0,0 +1,45 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_
|
| +#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_
|
| +
|
| +#include "base/compiler_specific.h"
|
| +#include "chrome/browser/ui/webui/options/options_ui.h"
|
| +#include "chromeos/dbus/system_clock_client.h"
|
| +
|
| +namespace chromeos {
|
| +namespace options {
|
| +
|
| +// Chrome OS handler for the set date/time link in the Advanced settings page.
|
| +class DateTimeOptionsHandler : public ::options::OptionsPageUIHandler,
|
| + public SystemClockClient::Observer {
|
| + public:
|
| + DateTimeOptionsHandler();
|
| + virtual ~DateTimeOptionsHandler();
|
| +
|
| + // OptionsPageUIHandler:
|
| + virtual void RegisterMessages() OVERRIDE;
|
| + virtual void InitializeHandler() OVERRIDE;
|
| + virtual void InitializePage() OVERRIDE;
|
| +
|
| + private:
|
| + // SystemClockClient::Observer:
|
| + virtual void SystemClockCanSetTimeChanged(bool can_set_time) OVERRIDE;
|
| +
|
| + // Callback for the "showSetTime" message to show the set time dialog. No
|
| + // arguments are expected.
|
| + void HandleShowSetTime(const base::ListValue* args);
|
| +
|
| + // Only expose the button and dialog if the system time can be set.
|
| + bool can_set_time_;
|
| + bool page_initialized_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(DateTimeOptionsHandler);
|
| +};
|
| +
|
| +} // namespace options
|
| +} // namespace chromeos
|
| +
|
| +#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_DATE_TIME_OPTIONS_HANDLER_H_
|
|
|