summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 17:15:00 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-23 17:15:00 +0000
commitb635b728109908e7d458c07d0b937b6b9afad9fe (patch)
tree8975d1ba7334f74e869e362ad01642bd0be2938c /ash/shell.cc
parentb227ed707ed9a16bd071098a1500a182ea83a652 (diff)
downloadchromium_src-b635b728109908e7d458c07d0b937b6b9afad9fe.zip
chromium_src-b635b728109908e7d458c07d0b937b6b9afad9fe.tar.gz
chromium_src-b635b728109908e7d458c07d0b937b6b9afad9fe.tar.bz2
Revert r128507 "Revert r128436 "relanding: disabled workspace_window_resizer test. fixed access-after-free.""
TBR=backer@chromium.org BUG=chromium-os:28304 TEST=none Review URL: https://chromiumcodereview.appspot.com/9837046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128509 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 2169b72..dcdf714 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_;