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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/date_time_handler.h

Issue 2447343002: MD Settings: Show "Set date and time" button when relevant (Closed)
Patch Set: paper-icon-button-light.html Created 4 years, 2 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/settings/chromeos/date_time_handler.h
diff --git a/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h b/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h
index c88dbcae81627c14eb4a5f026970dca22a4379df..9169f8498179cf648b8a2085436b301059d06db8 100644
--- a/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h
+++ b/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h
@@ -9,6 +9,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/ui/webui/settings/settings_page_ui_handler.h"
+#include "chromeos/dbus/system_clock_client.h"
#include "components/prefs/pref_change_registrar.h"
namespace base {
@@ -23,7 +24,8 @@ namespace chromeos {
namespace settings {
// Chrome OS date and time settings page UI handler.
-class DateTimeHandler : public ::settings::SettingsPageUIHandler {
+class DateTimeHandler : public ::settings::SettingsPageUIHandler,
+ public SystemClockClient::Observer {
public:
~DateTimeHandler() override;
@@ -38,12 +40,18 @@ class DateTimeHandler : public ::settings::SettingsPageUIHandler {
private:
DateTimeHandler();
+ // SystemClockClient::Observer implementation.
+ void SystemClockCanSetTimeChanged(bool can_set_time) override;
+
// Called when the page is ready.
void HandleDateTimePageReady(const base::ListValue* args);
// Handler to fetch the list of time zones.
void HandleGetTimeZones(const base::ListValue* args);
+ // Called to show the Set Time UI.
+ void HandleShowSetDateTimeUI(const base::ListValue* args);
+
// Updates the UI, enabling or disabling the time zone automatic detection
// setting according to policy.
void NotifyTimezoneAutomaticDetectionPolicy();

Powered by Google App Engine
This is Rietveld 408576698