| Index: ash/monitor/monitor_controller.cc
|
| diff --git a/ash/monitor/monitor_controller.cc b/ash/monitor/monitor_controller.cc
|
| index 3ebfea4877601869e060c759a113a21eda047e24..5565b6dc8053fe0ed9e0175f7f8b94b34c4a5637 100644
|
| --- a/ash/monitor/monitor_controller.cc
|
| +++ b/ash/monitor/monitor_controller.cc
|
| @@ -13,7 +13,7 @@
|
| #include "base/stl_util.h"
|
| #include "base/time.h"
|
| #include "ui/aura/env.h"
|
| -#include "ui/aura/monitor.h"
|
| +#include "ui/aura/monitor_aura.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/aura/window.h"
|
|
|
| @@ -46,30 +46,33 @@ MonitorController::MonitorController() {
|
| MonitorController::~MonitorController() {
|
| aura::Env::GetInstance()->monitor_manager()->RemoveObserver(this);
|
| // Remove the root first.
|
| - aura::Monitor* monitor = Shell::GetRootWindow()->GetProperty(kMonitorKey);
|
| + aura::MonitorAura* monitor = Shell::GetRootWindow()->GetProperty(kMonitorKey);
|
| DCHECK(monitor);
|
| root_windows_.erase(monitor);
|
| STLDeleteContainerPairSecondPointers(
|
| root_windows_.begin(), root_windows_.end());
|
| }
|
|
|
| -void MonitorController::OnMonitorBoundsChanged(const aura::Monitor* monitor) {
|
| - root_windows_[monitor]->SetHostBounds(monitor->bounds());
|
| +void MonitorController::OnMonitorBoundsChanged(const gfx::Monitor* monitor) {
|
| + const aura::MonitorAura* monitor_aura =
|
| + static_cast<const aura::MonitorAura*>(monitor);
|
| + root_windows_[monitor]->SetHostBounds(monitor_aura->bounds());
|
| }
|
|
|
| -void MonitorController::OnMonitorAdded(aura::Monitor* monitor) {
|
| +void MonitorController::OnMonitorAdded(gfx::Monitor* monitor) {
|
| + aura::MonitorAura* monitor_aura = static_cast<aura::MonitorAura*>(monitor);
|
| if (root_windows_.empty()) {
|
| root_windows_[monitor] = Shell::GetRootWindow();
|
| - Shell::GetRootWindow()->SetHostBounds(monitor->bounds());
|
| + Shell::GetRootWindow()->SetHostBounds(monitor_aura->bounds());
|
| return;
|
| }
|
| aura::RootWindow* root = aura::Env::GetInstance()->monitor_manager()->
|
| - CreateRootWindowForMonitor(monitor);
|
| + CreateRootWindowForMonitor(monitor_aura);
|
| root_windows_[monitor] = root;
|
| SetupAsSecondaryMonitor(root);
|
| }
|
|
|
| -void MonitorController::OnMonitorRemoved(const aura::Monitor* monitor) {
|
| +void MonitorController::OnMonitorRemoved(const gfx::Monitor* monitor) {
|
| aura::RootWindow* root = root_windows_[monitor];
|
| DCHECK(root);
|
| // Primary monitor should never be removed by MonitorManager.
|
| @@ -86,8 +89,8 @@ void MonitorController::Init() {
|
| aura::MonitorManager* monitor_manager =
|
| aura::Env::GetInstance()->monitor_manager();
|
| for (size_t i = 0; i < monitor_manager->GetNumMonitors(); ++i) {
|
| - aura::Monitor* monitor = monitor_manager->GetMonitorAt(i);
|
| - const aura::Monitor* key = monitor;
|
| + aura::MonitorAura* monitor = monitor_manager->GetMonitorAt(i);
|
| + const gfx::Monitor* key = monitor;
|
| if (i == 0) {
|
| // Primary monitor
|
| root_windows_[key] = Shell::GetRootWindow();
|
|
|