| Index: ash/wm/workspace/workspace_manager.cc
|
| diff --git a/ash/wm/workspace/workspace_manager.cc b/ash/wm/workspace/workspace_manager.cc
|
| index caf7d93ce440888d5683800c8df5881612df7dc4..f23539fccc337a2d3f5b886fc2978766d25a7f7a 100644
|
| --- a/ash/wm/workspace/workspace_manager.cc
|
| +++ b/ash/wm/workspace/workspace_manager.cc
|
| @@ -17,9 +17,11 @@
|
| #include "base/auto_reset.h"
|
| #include "base/logging.h"
|
| #include "base/stl_util.h"
|
| +#include "ui/aura/env.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/root_window.h"
|
| -#include "ui/aura/screen_aura.h"
|
| +#include "ui/aura/monitor.h"
|
| +#include "ui/aura/monitor_manager.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/base/ui_base_types.h"
|
| #include "ui/gfx/compositor/layer.h"
|
| @@ -157,7 +159,7 @@ void WorkspaceManager::SetWorkspaceSize(const gfx::Size& workspace_size) {
|
| SetWorkspaceBounds();
|
| }
|
|
|
| -void WorkspaceManager::OnScreenWorkAreaInsetsChanged() {
|
| +void WorkspaceManager::OnMonitorWorkAreaInsetsChanged() {
|
| SetWorkspaceBounds();
|
| }
|
|
|
| @@ -286,9 +288,13 @@ void WorkspaceManager::SetActiveWorkspace(Workspace* workspace) {
|
| is_overview_ = false;
|
| }
|
|
|
| -gfx::Rect WorkspaceManager::GetWorkAreaBounds() {
|
| +gfx::Rect WorkspaceManager::GetWorkAreaBounds() const {
|
| gfx::Rect bounds(workspace_size_);
|
| - bounds.Inset(Shell::GetRootWindow()->screen()->work_area_insets());
|
| + const aura::MonitorManager* monitor_manager =
|
| + aura::Env::GetInstance()->monitor_manager();
|
| + const aura::Monitor* monitor =
|
| + monitor_manager->GetMonitorNearestWindow(contents_view_);
|
| + bounds.Inset(monitor->work_area_insets());
|
| return bounds;
|
| }
|
|
|
|
|