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

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix new addition Created 8 years, 2 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
Index: ash/wm/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index c8e0075669dd6256504d0cfb0e216abefeb1fbd5..1ddf110239086b9a23c0efe1d54866677c991f1a 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -193,11 +193,12 @@ void WorkspaceWindowResizer::CompleteDrag(int event_flags) {
// Check if the destination is another display.
gfx::Point last_mouse_location_in_screen = last_mouse_location_;
wm::ConvertPointToScreen(window()->parent(), &last_mouse_location_in_screen);
+ gfx::Screen* screen = Shell::GetScreen();
const gfx::Display dst_display =
- gfx::Screen::GetDisplayNearestPoint(last_mouse_location_in_screen);
+ screen->GetDisplayNearestPoint(last_mouse_location_in_screen);
if (dst_display.id() !=
- gfx::Screen::GetDisplayNearestWindow(window()->GetRootWindow()).id()) {
+ screen->GetDisplayNearestWindow(window()->GetRootWindow()).id()) {
// Don't animate when moving to another display.
const gfx::Rect dst_bounds =
ScreenAsh::ConvertRectToScreen(window()->parent(), bounds);
@@ -426,8 +427,8 @@ void WorkspaceWindowResizer::AdjustBoundsForMainWindow(
gfx::Point last_mouse_location_in_screen = last_mouse_location_;
wm::ConvertPointToScreen(window()->parent(), &last_mouse_location_in_screen);
- gfx::Display display =
- gfx::Screen::GetDisplayNearestPoint(last_mouse_location_in_screen);
+ gfx::Display display = Shell::GetScreen()->GetDisplayNearestPoint(
+ last_mouse_location_in_screen);
gfx::Rect work_area =
ScreenAsh::ConvertRectFromScreen(window()->parent(), display.work_area());
if (details_.window_component == HTCAPTION) {
@@ -544,7 +545,8 @@ void WorkspaceWindowResizer::UpdateDragPhantomWindow(const gfx::Rect& bounds,
PhantomWindowController::STYLE_DRAGGING);
// Always show the drag phantom on the |another_root| window.
drag_phantom_window_controller_->SetDestinationDisplay(
- gfx::Screen::GetDisplayMatching(another_root->GetBoundsInScreen()));
+ Shell::GetScreen()->GetDisplayMatching(
+ another_root->GetBoundsInScreen()));
if (!layer_)
RecreateWindowLayers();
drag_phantom_window_controller_->Show(bounds_in_screen, layer_);
« no previous file with comments | « ash/wm/workspace/workspace_manager_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698