OLD | NEW |
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/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell_window_ids.h" | 8 #include "ash/shell_window_ids.h" |
9 #include "ash/wm/root_window_event_filter.h" | |
10 #include "ash/wm/window_animations.h" | 9 #include "ash/wm/window_animations.h" |
11 #include "ash/wm/workspace/workspace_event_filter.h" | 10 #include "ash/wm/workspace/workspace_event_filter.h" |
12 #include "ash/wm/workspace/workspace_window_resizer.h" | 11 #include "ash/wm/workspace/workspace_window_resizer.h" |
13 #include "grit/ui_resources.h" | 12 #include "grit/ui_resources.h" |
14 #include "ui/aura/event_filter.h" | 13 #include "ui/aura/event_filter.h" |
15 #include "ui/aura/root_window.h" | 14 #include "ui/aura/root_window.h" |
| 15 #include "ui/aura/shared/root_window_event_filter.h" |
16 #include "ui/aura/window.h" | 16 #include "ui/aura/window.h" |
17 #include "ui/aura/window_delegate.h" | 17 #include "ui/aura/window_delegate.h" |
18 #include "ui/base/hit_test.h" | 18 #include "ui/base/hit_test.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 #include "ui/gfx/canvas.h" | 20 #include "ui/gfx/canvas.h" |
21 #include "ui/gfx/image/image.h" | 21 #include "ui/gfx/image/image.h" |
22 #include "ui/gfx/screen.h" | 22 #include "ui/gfx/screen.h" |
23 #include "ui/views/view.h" | 23 #include "ui/views/view.h" |
24 #include "ui/views/widget/widget.h" | 24 #include "ui/views/widget/widget.h" |
25 #include "ui/views/widget/widget_delegate.h" | 25 #include "ui/views/widget/widget_delegate.h" |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE { | 92 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE { |
93 controller_->CompleteResize(event.flags()); | 93 controller_->CompleteResize(event.flags()); |
94 } | 94 } |
95 virtual void OnMouseCaptureLost() OVERRIDE { | 95 virtual void OnMouseCaptureLost() OVERRIDE { |
96 controller_->CancelResize(); | 96 controller_->CancelResize(); |
97 } | 97 } |
98 virtual gfx::NativeCursor GetCursor( | 98 virtual gfx::NativeCursor GetCursor( |
99 const views::MouseEvent& event) OVERRIDE { | 99 const views::MouseEvent& event) OVERRIDE { |
100 int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; | 100 int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; |
101 return RootWindowEventFilter::CursorForWindowComponent(component); | 101 return aura::shared::RootWindowEventFilter::CursorForWindowComponent( |
| 102 component); |
102 } | 103 } |
103 | 104 |
104 private: | 105 private: |
105 MultiWindowResizeController* controller_; | 106 MultiWindowResizeController* controller_; |
106 const Direction direction_; | 107 const Direction direction_; |
107 const SkBitmap* image_; | 108 const SkBitmap* image_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(ResizeView); | 110 DISALLOW_COPY_AND_ASSIGN(ResizeView); |
110 }; | 111 }; |
111 | 112 |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 489 |
489 gfx::Point window_loc(screen_location); | 490 gfx::Point window_loc(screen_location); |
490 aura::Window::ConvertPointToWindow( | 491 aura::Window::ConvertPointToWindow( |
491 window->GetRootWindow(), window, &window_loc); | 492 window->GetRootWindow(), window, &window_loc); |
492 return window->HitTest(window_loc) && | 493 return window->HitTest(window_loc) && |
493 window->delegate()->GetNonClientComponent(window_loc) == component; | 494 window->delegate()->GetNonClientComponent(window_loc) == component; |
494 } | 495 } |
495 | 496 |
496 } // namespace internal | 497 } // namespace internal |
497 } // namespace ash | 498 } // namespace ash |
OLD | NEW |