| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/panels/panel_window_resizer.h" | 5 #include "ash/wm/panels/panel_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/launcher/launcher.h" | 7 #include "ash/launcher/launcher.h" |
| 8 #include "ash/launcher/launcher_model.h" | 8 #include "ash/launcher/launcher_model.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 layout_manager()); | 71 layout_manager()); |
| 72 manager->Relayout(); | 72 manager->Relayout(); |
| 73 return window; | 73 return window; |
| 74 } | 74 } |
| 75 | 75 |
| 76 static PanelWindowResizer* CreatePanelWindowResizer( | 76 static PanelWindowResizer* CreatePanelWindowResizer( |
| 77 aura::Window* window, | 77 aura::Window* window, |
| 78 const gfx::Point& point_in_parent, | 78 const gfx::Point& point_in_parent, |
| 79 int window_component) { | 79 int window_component) { |
| 80 return static_cast<PanelWindowResizer*>(CreateWindowResizer( | 80 return static_cast<PanelWindowResizer*>(CreateWindowResizer( |
| 81 window, point_in_parent, window_component).release()); | 81 window, point_in_parent, window_component, |
| 82 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release()); |
| 82 } | 83 } |
| 83 | 84 |
| 84 void DragStart(aura::Window* window) { | 85 void DragStart(aura::Window* window) { |
| 85 resizer_.reset(CreatePanelWindowResizer(window, window->bounds().origin(), | 86 resizer_.reset(CreatePanelWindowResizer(window, window->bounds().origin(), |
| 86 HTCAPTION)); | 87 HTCAPTION)); |
| 87 ASSERT_TRUE(resizer_.get()); | 88 ASSERT_TRUE(resizer_.get()); |
| 88 } | 89 } |
| 89 | 90 |
| 90 void DragMove(int dx, int dy) { | 91 void DragMove(int dx, int dy) { |
| 91 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0); | 92 resizer_->Drag(CalculateDragPoint(*resizer_, dx, dy), 0); |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 ash::Shell* shell = ash::Shell::GetInstance(); | 449 ash::Shell* shell = ash::Shell::GetInstance(); |
| 449 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow()); | 450 shell->SetShelfAlignment(SHELF_ALIGNMENT_LEFT, shell->GetPrimaryRootWindow()); |
| 450 DragAlongShelfReorder(0, -1); | 451 DragAlongShelfReorder(0, -1); |
| 451 } | 452 } |
| 452 | 453 |
| 453 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, | 454 INSTANTIATE_TEST_CASE_P(LtrRtl, PanelWindowResizerTextDirectionTest, |
| 454 testing::Bool()); | 455 testing::Bool()); |
| 455 | 456 |
| 456 } // namespace internal | 457 } // namespace internal |
| 457 } // namespace ash | 458 } // namespace ash |
| OLD | NEW |