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

Unified Diff: ash/wm/shelf_layout_manager.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/wm/root_window_event_filter_unittest.cc ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/shelf_layout_manager.cc
diff --git a/ash/wm/shelf_layout_manager.cc b/ash/wm/shelf_layout_manager.cc
index dc6eee54b01fe4511e666c8d9e2cb07646cf4944..a1188933eafe6df19e9d0da7552aff881a5eca01 100644
--- a/ash/wm/shelf_layout_manager.cc
+++ b/ash/wm/shelf_layout_manager.cc
@@ -21,6 +21,7 @@
#include "ui/gfx/compositor/layer_animation_observer.h"
#include "ui/gfx/compositor/layer_animator.h"
#include "ui/gfx/compositor/scoped_layer_animation_settings.h"
+#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
namespace ash {
@@ -149,7 +150,7 @@ bool ShelfLayoutManager::IsVisible() const {
gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
aura::Window* window) const {
// TODO: needs to be multi-mon aware.
- gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(window));
+ gfx::Rect bounds(gfx::Screen::GetMonitorNearestWindow(window).bounds());
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT ||
auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS) {
bounds.set_height(bounds.height() - kAutoHideHeight);
@@ -162,7 +163,7 @@ gfx::Rect ShelfLayoutManager::GetMaximizedWindowBounds(
gfx::Rect ShelfLayoutManager::GetUnmaximizedWorkAreaBounds(
aura::Window* window) const {
// TODO: needs to be multi-mon aware.
- gfx::Rect bounds(gfx::Screen::GetMonitorAreaNearestWindow(window));
+ gfx::Rect bounds(gfx::Screen::GetMonitorNearestWindow(window).bounds());
if (auto_hide_behavior_ == SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS)
bounds.set_height(bounds.height() - kAutoHideHeight);
else
« no previous file with comments | « ash/wm/root_window_event_filter_unittest.cc ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698