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

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

Issue 2341783005: mash: Fix Chrome crash accessing chrome://settings. (Closed)
Patch Set: Avoid PowerStatus access; not init in Chrome. Created 4 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/power_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b25191cfb477b3e4d27512e50bae65a1e0b8615c..ed59602fbf021369870315cdead40a0c0ce2211c 100644
--- a/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/display_options_handler.cc
@@ -23,6 +23,7 @@
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/chromeos/display/display_preferences.h"
+#include "chrome/browser/ui/ash/ash_util.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/chromeos_switches.h"
#include "content/public/browser/user_metrics.h"
@@ -191,14 +192,15 @@ base::DictionaryValue* ConvertBoundsToValue(const gfx::Rect& bounds) {
} // namespace
DisplayOptionsHandler::DisplayOptionsHandler() {
- // ash::Shell doesn't exist in Athena.
- // See: http://crbug.com/416961
- ash::Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
+ // TODO(mash) Support Chrome display settings in Mash. crbug.com/548429
+ if (!chrome::IsRunningInMash())
+ ash::Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
}
DisplayOptionsHandler::~DisplayOptionsHandler() {
- // ash::Shell doesn't exist in Athena.
- ash::Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this);
+ // TODO(mash) Support Chrome display settings in Mash. crbug.com/548429
+ if (!chrome::IsRunningInMash())
+ ash::Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this);
}
void DisplayOptionsHandler::GetLocalizedValues(
@@ -373,6 +375,10 @@ void DisplayOptionsHandler::SendAllDisplayInfo() {
}
void DisplayOptionsHandler::UpdateDisplaySettingsEnabled() {
+ // TODO(mash) Support Chrome display settings in Mash. crbug.com/548429
+ if (chrome::IsRunningInMash())
+ return;
+
ash::DisplayManager* display_manager = GetDisplayManager();
bool disable_multi_display_layout =
base::CommandLine::ForCurrentProcess()->HasSwitch(
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/chromeos/power_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698