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

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

Issue 2438443005: MD Settings: Date and Time page, part 2/3 (Closed)
Patch Set: rebase 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 48175878b77042ccd5eecff27a44495627f0875f..c88dbcae81627c14eb4a5f026970dca22a4379df 100644
--- a/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h
+++ b/chrome/browser/ui/webui/settings/chromeos/date_time_handler.h
@@ -6,7 +6,14 @@
#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_DATE_TIME_HANDLER_H_
#include "base/macros.h"
+#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 "components/prefs/pref_change_registrar.h"
+
+namespace base {
+class ListValue;
+}
namespace content {
class WebUIDataSource;
@@ -31,6 +38,24 @@ class DateTimeHandler : public ::settings::SettingsPageUIHandler {
private:
DateTimeHandler();
+ // 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);
+
+ // Updates the UI, enabling or disabling the time zone automatic detection
+ // setting according to policy.
+ void NotifyTimezoneAutomaticDetectionPolicy();
+
+ std::unique_ptr<chromeos::CrosSettings::ObserverSubscription>
+ system_timezone_policy_subscription_;
+
+ // Used to listen to changes to the system time zone detection policy.
+ PrefChangeRegistrar local_state_pref_change_registrar_;
+
+ base::WeakPtrFactory<DateTimeHandler> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(DateTimeHandler);
};
« no previous file with comments | « chrome/browser/resources/settings/md_select_css.html ('k') | chrome/browser/ui/webui/settings/chromeos/date_time_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698