| 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/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/display/display_manager.h" | 7 #include "ash/display/display_manager.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_util.h" | 9 #include "ash/screen_util.h" |
| 10 #include "ash/shelf/shelf_layout_manager.h" | 10 #include "ash/shelf/shelf_layout_manager.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 protected: | 141 protected: |
| 142 WindowResizer* CreateResizerForTest( | 142 WindowResizer* CreateResizerForTest( |
| 143 aura::Window* window, | 143 aura::Window* window, |
| 144 const gfx::Point& point_in_parent, | 144 const gfx::Point& point_in_parent, |
| 145 int window_component) { | 145 int window_component) { |
| 146 WindowResizer* resizer = CreateWindowResizer( | 146 WindowResizer* resizer = CreateWindowResizer( |
| 147 window, | 147 window, |
| 148 point_in_parent, | 148 point_in_parent, |
| 149 window_component, | 149 window_component, |
| 150 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release(); | 150 aura::client::WINDOW_MOVE_SOURCE_MOUSE).release(); |
| 151 workspace_resizer_ = WorkspaceWindowResizer::instance_; | 151 workspace_resizer_ = WorkspaceWindowResizer::GetInstanceForTest(); |
| 152 return resizer; | 152 return resizer; |
| 153 } | 153 } |
| 154 WorkspaceWindowResizer* CreateWorkspaceResizerForTest( | 154 WorkspaceWindowResizer* CreateWorkspaceResizerForTest( |
| 155 aura::Window* window, | 155 aura::Window* window, |
| 156 const gfx::Point& point_in_parent, | 156 const gfx::Point& point_in_parent, |
| 157 int window_component, | 157 int window_component, |
| 158 aura::client::WindowMoveSource source, | 158 aura::client::WindowMoveSource source, |
| 159 const std::vector<aura::Window*>& attached_windows) { | 159 const std::vector<aura::Window*>& attached_windows) { |
| 160 wm::WindowState* window_state = wm::GetWindowState(window); | 160 wm::WindowState* window_state = wm::GetWindowState(window); |
| 161 window_state->CreateDragDetails( | 161 window_state->CreateDragDetails( |
| (...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1862 // Drag even more to snap to the edge. | 1862 // Drag even more to snap to the edge. |
| 1863 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), | 1863 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), |
| 1864 gfx::Point(400, kRootHeight - 25), | 1864 gfx::Point(400, kRootHeight - 25), |
| 1865 base::TimeDelta::FromMilliseconds(10), | 1865 base::TimeDelta::FromMilliseconds(10), |
| 1866 5); | 1866 5); |
| 1867 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), | 1867 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), |
| 1868 touch_resize_window_->bounds().ToString()); | 1868 touch_resize_window_->bounds().ToString()); |
| 1869 } | 1869 } |
| 1870 | 1870 |
| 1871 } // namespace ash | 1871 } // namespace ash |
| OLD | NEW |