Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4095)

Unified Diff: chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h

Issue 247663003: Date and Time dialog for when the clock isn't synced. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, single quotes in browsertest js Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..5a4003efbae4fdc5c8453cbb73609b21d8d438ad
--- /dev/null
+++ b/chrome/browser/ui/webui/options/chromeos/date_time_options_handler.h
@@ -0,0 +1,47 @@
+// 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 GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
+ virtual void InitializeHandler() OVERRIDE;
+ virtual void InitializePage() OVERRIDE;
+ virtual void RegisterMessages() 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_

Powered by Google App Engine
This is Rietveld 408576698