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

Unified Diff: ash/shell.cc

Issue 9960042: Refactor screen/monitor so that gfx::Screen returns monitor object. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 8 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/screen_ash.cc ('k') | ash/system/tray/system_tray.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 83b7aac8f33f1376795a78ea31713dcaef578cc2..34997c3d5aa2aa9cdba7f1a2fc9bc9475d062482 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -63,7 +63,6 @@
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/env.h"
#include "ui/aura/layout_manager.h"
-#include "ui/aura/monitor.h"
#include "ui/aura/monitor_manager.h"
#include "ui/aura/monitor_manager.h"
#include "ui/aura/root_window.h"
@@ -71,6 +70,8 @@
#include "ui/aura/window.h"
#include "ui/gfx/compositor/layer.h"
#include "ui/gfx/compositor/layer_animator.h"
+#include "ui/gfx/monitor.h"
+#include "ui/gfx/screen.h"
#include "ui/gfx/size.h"
#include "ui/ui_controls/ui_controls.h"
#include "ui/views/widget/native_widget_aura.h"
@@ -788,11 +789,11 @@ void Shell::RotateFocus(Direction direction) {
void Shell::SetMonitorWorkAreaInsets(Window* contains,
const gfx::Insets& insets) {
- aura::Monitor* monitor = aura::Env::GetInstance()->monitor_manager()->
- GetMonitorNearestWindow(contains);
- if (monitor->work_area_insets() == insets)
+ internal::MultiMonitorManager* monitor_manager =
+ static_cast<internal::MultiMonitorManager*>(
+ aura::Env::GetInstance()->monitor_manager());
+ if (!monitor_manager->UpdateWorkAreaOfMonitorNearestWindow(contains, insets))
return;
- monitor->set_work_area_insets(insets);
FOR_EACH_OBSERVER(ShellObserver, observers_,
OnMonitorWorkAreaInsetsChanged());
}
« no previous file with comments | « ash/screen_ash.cc ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698