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

Unified Diff: ash/shell.cc

Issue 9837046: Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-aft… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « ash/monitor/secondary_monitor_view.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 2169b72ce24c1a090c1c2318e9b55124ef371ece..dcdf7147c6854101a79dafb75695814b689b9b06 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -90,6 +90,10 @@
#include "ash/accelerators/nested_dispatcher_controller.h"
#endif
+#if defined(USE_X11)
+#include "ui/aura/monitor_change_observer_x11.h"
+#endif
+
namespace ash {
namespace {
@@ -528,6 +532,9 @@ Shell::~Shell() {
// The system tray needs to be reset before all the windows are destroyed.
tray_.reset();
+ // Desroy secondary monitor's widgets before all the windows are destroyed.
+ monitor_controller_.reset();
+
// Delete containers now so that child windows does not access
// observers when they are destructed.
aura::RootWindow* root_window = GetRootWindow();
@@ -561,6 +568,9 @@ Shell* Shell::CreateInstance(ShellDelegate* delegate) {
CHECK(!instance_);
aura::Env::GetInstance()->SetMonitorManager(
new internal::MultiMonitorManager());
+#if defined(USE_X11)
+ aura::Env::GetInstance()->monitor_change_observer()->NotifyMonitorChange();
+#endif
instance_ = new Shell(delegate);
instance_->Init();
return instance_;
« no previous file with comments | « ash/monitor/secondary_monitor_view.cc ('k') | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698