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

Side by Side Diff: ash/wm/workspace/multi_window_resize_controller.cc

Issue 445703005: Revert of Moving coordinate conversion methods from ash/wm to ui/wm. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « ash/wm/window_resizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/multi_window_resize_controller.h" 5 #include "ash/wm/workspace/multi_window_resize_controller.h"
6 6
7 #include "ash/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/wm/coordinate_conversion.h"
10 #include "ash/wm/window_animations.h" 11 #include "ash/wm/window_animations.h"
11 #include "ash/wm/workspace/workspace_event_handler.h" 12 #include "ash/wm/workspace/workspace_event_handler.h"
12 #include "ash/wm/workspace/workspace_window_resizer.h" 13 #include "ash/wm/workspace/workspace_window_resizer.h"
13 #include "grit/ash_resources.h" 14 #include "grit/ash_resources.h"
14 #include "ui/aura/client/screen_position_client.h" 15 #include "ui/aura/client/screen_position_client.h"
15 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
16 #include "ui/aura/window_delegate.h" 17 #include "ui/aura/window_delegate.h"
17 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
18 #include "ui/base/hit_test.h" 19 #include "ui/base/hit_test.h"
19 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/gfx/canvas.h" 21 #include "ui/gfx/canvas.h"
21 #include "ui/gfx/image/image.h" 22 #include "ui/gfx/image/image.h"
22 #include "ui/gfx/screen.h" 23 #include "ui/gfx/screen.h"
23 #include "ui/views/view.h" 24 #include "ui/views/view.h"
24 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
25 #include "ui/views/widget/widget_delegate.h" 26 #include "ui/views/widget/widget_delegate.h"
26 #include "ui/wm/core/compound_event_filter.h" 27 #include "ui/wm/core/compound_event_filter.h"
27 #include "ui/wm/core/coordinate_conversion.h"
28 28
29 using aura::Window; 29 using aura::Window;
30 30
31 namespace ash { 31 namespace ash {
32 namespace { 32 namespace {
33 33
34 // Delay before showing. 34 // Delay before showing.
35 const int kShowDelayMS = 400; 35 const int kShowDelayMS = 400;
36 36
37 // Delay before hiding. 37 // Delay before hiding.
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Have to explicitly reset the WindowResizer, otherwise Hide() does nothing. 221 // Have to explicitly reset the WindowResizer, otherwise Hide() does nothing.
222 window_resizer_.reset(); 222 window_resizer_.reset();
223 Hide(); 223 Hide();
224 } 224 }
225 225
226 MultiWindowResizeController::ResizeWindows 226 MultiWindowResizeController::ResizeWindows
227 MultiWindowResizeController::DetermineWindowsFromScreenPoint( 227 MultiWindowResizeController::DetermineWindowsFromScreenPoint(
228 aura::Window* window) const { 228 aura::Window* window) const {
229 gfx::Point mouse_location( 229 gfx::Point mouse_location(
230 gfx::Screen::GetScreenFor(window)->GetCursorScreenPoint()); 230 gfx::Screen::GetScreenFor(window)->GetCursorScreenPoint());
231 ::wm::ConvertPointFromScreen(window, &mouse_location); 231 wm::ConvertPointFromScreen(window, &mouse_location);
232 const int component = 232 const int component =
233 window->delegate()->GetNonClientComponent(mouse_location); 233 window->delegate()->GetNonClientComponent(mouse_location);
234 return DetermineWindows(window, component, mouse_location); 234 return DetermineWindows(window, component, mouse_location);
235 } 235 }
236 236
237 MultiWindowResizeController::ResizeWindows 237 MultiWindowResizeController::ResizeWindows
238 MultiWindowResizeController::DetermineWindows( 238 MultiWindowResizeController::DetermineWindows(
239 Window* window, 239 Window* window,
240 int window_component, 240 int window_component,
241 const gfx::Point& point) const { 241 const gfx::Point& point) const {
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 return false; 533 return false;
534 534
535 gfx::Point window_loc(location_in_screen); 535 gfx::Point window_loc(location_in_screen);
536 aura::Window::ConvertPointToTarget( 536 aura::Window::ConvertPointToTarget(
537 window->GetRootWindow(), window, &window_loc); 537 window->GetRootWindow(), window, &window_loc);
538 return window->ContainsPoint(window_loc) && 538 return window->ContainsPoint(window_loc) &&
539 window->delegate()->GetNonClientComponent(window_loc) == component; 539 window->delegate()->GetNonClientComponent(window_loc) == component;
540 } 540 }
541 541
542 } // namespace ash 542 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_resizer.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698