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..ee3590b313bac2aadcb1bef2c2f1f045c4ca2ed4 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,16 @@ base::DictionaryValue* ConvertDisplayModeToValue(int64 display_id, |
} // namespace |
DisplayOptionsHandler::DisplayOptionsHandler() { |
- ash::Shell::GetInstance()->display_controller()->AddObserver(this); |
+ // ash::Shell doesn't exist in Athena. |
+ // See: http://crbug.com/416961 |
+ if (ash::Shell::HasInstance()) |
oshima
2014/09/23 20:48:21
can you use ifdef USE_ATHENA?
Jun Mukai
2014/09/23 20:52:38
Done.
|
+ ash::Shell::GetInstance()->display_controller()->AddObserver(this); |
} |
DisplayOptionsHandler::~DisplayOptionsHandler() { |
- ash::Shell::GetInstance()->display_controller()->RemoveObserver(this); |
+ // ash::Shell doesn't exist in Athena. |
+ if (ash::Shell::HasInstance()) |
+ ash::Shell::GetInstance()->display_controller()->RemoveObserver(this); |
} |
void DisplayOptionsHandler::GetLocalizedValues( |
@@ -201,6 +206,9 @@ void DisplayOptionsHandler::GetLocalizedValues( |
void DisplayOptionsHandler::InitializePage() { |
DCHECK(web_ui()); |
+ web_ui()->CallJavascriptFunction( |
+ "options.BrowserOptions.enableDisplayButton", |
+ base::FundamentalValue(ash::Shell::HasInstance())); |
oshima
2014/09/23 20:48:21
ditto
Jun Mukai
2014/09/23 20:52:38
Done.
|
} |
void DisplayOptionsHandler::RegisterMessages() { |