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

Unified Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 593273002: Excludes settings which uses Ash from Athena. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years, 3 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/display_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
index 835451db4c69294215333650ee485779bd2550b1..0cc3198d5e09e45e9676592046607c2489442717 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -145,11 +145,18 @@ base::DictionaryValue* ConvertDisplayModeToValue(int64 display_id,
} // namespace
DisplayOptionsHandler::DisplayOptionsHandler() {
+#if !defined(USE_ATHENA)
+ // ash::Shell doesn't exist in Athena.
+ // See: http://crbug.com/416961
ash::Shell::GetInstance()->display_controller()->AddObserver(this);
+#endif
}
DisplayOptionsHandler::~DisplayOptionsHandler() {
+#if !defined(USE_ATHENA)
+ // ash::Shell doesn't exist in Athena.
ash::Shell::GetInstance()->display_controller()->RemoveObserver(this);
+#endif
}
void DisplayOptionsHandler::GetLocalizedValues(
@@ -201,6 +208,11 @@ void DisplayOptionsHandler::GetLocalizedValues(
void DisplayOptionsHandler::InitializePage() {
DCHECK(web_ui());
+#if !defined(USE_ATHENA)
+ web_ui()->CallJavascriptFunction(
+ "options.BrowserOptions.enableDisplayButton",
+ base::FundamentalValue(true));
+#endif
}
void DisplayOptionsHandler::RegisterMessages() {

Powered by Google App Engine
This is Rietveld 408576698