Index: ash/shell.cc |
diff --git a/ash/shell.cc b/ash/shell.cc |
index 82069724ab218fd5c9ba3ae34251c31d983dcbb3..10b1e36c1c9d4748ed1ab4ef2d14fa1ab90555f1 100644 |
--- a/ash/shell.cc |
+++ b/ash/shell.cc |
@@ -15,6 +15,8 @@ |
#include "ash/focus_cycler.h" |
#include "ash/ime/input_method_event_filter.h" |
#include "ash/launcher/launcher.h" |
+#include "ash/monitor/multi_monitor_manager.h" |
+#include "ash/monitor/monitor_controller.h" |
#include "ash/screen_ash.h" |
#include "ash/shell_delegate.h" |
#include "ash/shell_factory.h" |
@@ -406,11 +408,9 @@ Shell::Shell(ShellDelegate* delegate) |
status_widget_(NULL) { |
gfx::Screen::SetInstance(screen_); |
ui_controls::InstallUIControlsAura(CreateUIControlsAura(root_window_.get())); |
- aura::Env::GetInstance()->monitor_manager()->AddObserver(this); |
} |
Shell::~Shell() { |
- aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this); |
RemoveRootWindowEventFilter(partial_screenshot_filter_.get()); |
RemoveRootWindowEventFilter(input_method_filter_.get()); |
RemoveRootWindowEventFilter(window_modality_controller_.get()); |
@@ -449,6 +449,7 @@ Shell::~Shell() { |
resize_shadow_controller_.reset(); |
shadow_controller_.reset(); |
window_cycle_controller_.reset(); |
+ monitor_controller_.reset(); |
// Launcher widget has a InputMethodBridge that references to |
// input_method_filter_'s input_method_. So explicitly release launcher_ |
@@ -464,6 +465,8 @@ Shell::~Shell() { |
// static |
Shell* Shell::CreateInstance(ShellDelegate* delegate) { |
CHECK(!instance_); |
+ aura::Env::GetInstance()->SetMonitorManager( |
+ new internal::MultiMonitorManager()); |
instance_ = new Shell(delegate); |
instance_->Init(); |
return instance_; |
@@ -617,6 +620,7 @@ void Shell::Init() { |
power_button_controller_.reset(new PowerButtonController); |
video_detector_.reset(new VideoDetector); |
window_cycle_controller_.reset(new WindowCycleController); |
+ monitor_controller_.reset(new internal::MonitorController); |
} |
aura::Window* Shell::GetContainer(int container_id) { |
@@ -709,14 +713,6 @@ int Shell::GetGridSize() const { |
} |
//////////////////////////////////////////////////////////////////////////////// |
-// Shell, aura::MonitorObserver implementation: |
- |
-void Shell::OnMonitorBoundsChanged(const aura::Monitor* monitor) { |
- if (aura::RootWindow::use_fullscreen_host_window()) |
- root_window_->SetHostSize(monitor->size()); |
-} |
- |
-//////////////////////////////////////////////////////////////////////////////// |
// Shell, private: |
void Shell::InitLayoutManagers() { |