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

Unified Diff: ash/wm/drag_window_resizer.cc

Issue 2660873002: Move two utility functions from ash/screen_util.h to ui/wm/core/coordinate_conversion.h (Closed)
Patch Set: rebase Created 3 years, 10 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/drag_window_controller.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/drag_window_resizer.cc
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index d4cf8aae4b8a7f0fdb80f6a010c3abbbab1f1d29..0ccaf9490f848c3be745ce4779aae9690263b1e5 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -8,7 +8,6 @@
#include "ash/common/wm/window_state.h"
#include "ash/common/wm_window.h"
#include "ash/display/mouse_cursor_event_filter.h"
-#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/wm/drag_window_controller.h"
#include "ash/wm/window_util.h"
@@ -91,8 +90,8 @@ void DragWindowResizer::CompleteDrag() {
if (bounds.height() > size.height())
bounds.set_height(size.height());
- gfx::Rect dst_bounds =
- ScreenUtil::ConvertRectToScreen(GetAuraTarget()->parent(), bounds);
+ gfx::Rect dst_bounds = bounds;
+ ::wm::ConvertRectToScreen(GetAuraTarget()->parent(), &dst_bounds);
// Adjust the position so that the cursor is on the window.
if (!dst_bounds.Contains(last_mouse_location_in_screen)) {
@@ -144,8 +143,8 @@ void DragWindowResizer::UpdateDragWindow(
if (!drag_window_controller_)
drag_window_controller_.reset(new DragWindowController(GetAuraTarget()));
- const gfx::Rect bounds_in_screen = ScreenUtil::ConvertRectToScreen(
- GetAuraTarget()->parent(), bounds_in_parent);
+ gfx::Rect bounds_in_screen = bounds_in_parent;
+ ::wm::ConvertRectToScreen(GetAuraTarget()->parent(), &bounds_in_screen);
gfx::Rect root_bounds_in_screen =
GetAuraTarget()->GetRootWindow()->GetBoundsInScreen();
« no previous file with comments | « ash/wm/drag_window_controller.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698