| 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/screen_ash.h" | 7 #include "ash/screen_ash.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/coordinate_conversion.h" |
| 11 #include "ash/wm/window_animations.h" | 11 #include "ash/wm/window_animations.h" |
| 12 #include "ash/wm/workspace/workspace_event_handler.h" | 12 #include "ash/wm/workspace/workspace_event_handler.h" |
| 13 #include "ash/wm/workspace/workspace_window_resizer.h" | 13 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 14 #include "grit/ash_resources.h" | 14 #include "grit/ash_resources.h" |
| 15 #include "ui/aura/client/screen_position_client.h" | 15 #include "ui/aura/client/screen_position_client.h" |
| 16 #include "ui/aura/event_filter.h" | 16 #include "ui/aura/event_filter.h" |
| 17 #include "ui/aura/root_window.h" | 17 #include "ui/aura/root_window.h" |
| 18 #include "ui/aura/shared/compound_event_filter.h" | |
| 19 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
| 20 #include "ui/aura/window_delegate.h" | 19 #include "ui/aura/window_delegate.h" |
| 21 #include "ui/base/hit_test.h" | 20 #include "ui/base/hit_test.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/gfx/canvas.h" | 22 #include "ui/gfx/canvas.h" |
| 24 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
| 25 #include "ui/gfx/screen.h" | 24 #include "ui/gfx/screen.h" |
| 25 #include "ui/views/corewm/compound_event_filter.h" |
| 26 #include "ui/views/view.h" | 26 #include "ui/views/view.h" |
| 27 #include "ui/views/widget/widget.h" | 27 #include "ui/views/widget/widget.h" |
| 28 #include "ui/views/widget/widget_delegate.h" | 28 #include "ui/views/widget/widget_delegate.h" |
| 29 | 29 |
| 30 using aura::Window; | 30 using aura::Window; |
| 31 | 31 |
| 32 namespace ash { | 32 namespace ash { |
| 33 namespace internal { | 33 namespace internal { |
| 34 | 34 |
| 35 namespace { | 35 namespace { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 } | 94 } |
| 95 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE { | 95 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE { |
| 96 controller_->CompleteResize(event.flags()); | 96 controller_->CompleteResize(event.flags()); |
| 97 } | 97 } |
| 98 virtual void OnMouseCaptureLost() OVERRIDE { | 98 virtual void OnMouseCaptureLost() OVERRIDE { |
| 99 controller_->CancelResize(); | 99 controller_->CancelResize(); |
| 100 } | 100 } |
| 101 virtual gfx::NativeCursor GetCursor( | 101 virtual gfx::NativeCursor GetCursor( |
| 102 const ui::MouseEvent& event) OVERRIDE { | 102 const ui::MouseEvent& event) OVERRIDE { |
| 103 int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; | 103 int component = (direction_ == LEFT_RIGHT) ? HTRIGHT : HTBOTTOM; |
| 104 return aura::shared::CompoundEventFilter::CursorForWindowComponent( | 104 return views::corewm::CompoundEventFilter::CursorForWindowComponent( |
| 105 component); | 105 component); |
| 106 } | 106 } |
| 107 | 107 |
| 108 private: | 108 private: |
| 109 MultiWindowResizeController* controller_; | 109 MultiWindowResizeController* controller_; |
| 110 const Direction direction_; | 110 const Direction direction_; |
| 111 const gfx::ImageSkia* image_; | 111 const gfx::ImageSkia* image_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(ResizeView); | 113 DISALLOW_COPY_AND_ASSIGN(ResizeView); |
| 114 }; | 114 }; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 533 |
| 534 gfx::Point window_loc(location_in_screen); | 534 gfx::Point window_loc(location_in_screen); |
| 535 aura::Window::ConvertPointToTarget( | 535 aura::Window::ConvertPointToTarget( |
| 536 window->GetRootWindow(), window, &window_loc); | 536 window->GetRootWindow(), window, &window_loc); |
| 537 return window->HitTest(window_loc) && | 537 return window->HitTest(window_loc) && |
| 538 window->delegate()->GetNonClientComponent(window_loc) == component; | 538 window->delegate()->GetNonClientComponent(window_loc) == component; |
| 539 } | 539 } |
| 540 | 540 |
| 541 } // namespace internal | 541 } // namespace internal |
| 542 } // namespace ash | 542 } // namespace ash |
| OLD | NEW |