| 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/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
| 9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
| 10 #include "ash/screen_ash.h" | 10 #include "ash/screen_ash.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 result += base::IntToString((*i)->id()); | 130 result += base::IntToString((*i)->id()); |
| 131 } | 131 } |
| 132 } | 132 } |
| 133 return result; | 133 return result; |
| 134 } | 134 } |
| 135 | 135 |
| 136 protected: | 136 protected: |
| 137 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer, | 137 gfx::Point CalculateDragPoint(const WorkspaceWindowResizer& resizer, |
| 138 int delta_x, | 138 int delta_x, |
| 139 int delta_y) const { | 139 int delta_y) const { |
| 140 gfx::Point location = resizer.GetInitialLocationInParentForTest(); | 140 gfx::Point location = resizer.GetInitialLocationForTest(); |
| 141 location.set_x(location.x() + delta_x); | 141 location.set_x(location.x() + delta_x); |
| 142 location.set_y(location.y() + delta_y); | 142 location.set_y(location.y() + delta_y); |
| 143 return location; | 143 return location; |
| 144 } | 144 } |
| 145 | 145 |
| 146 std::vector<aura::Window*> empty_windows() const { | 146 std::vector<aura::Window*> empty_windows() const { |
| 147 return std::vector<aura::Window*>(); | 147 return std::vector<aura::Window*>(); |
| 148 } | 148 } |
| 149 | 149 |
| 150 internal::ShelfLayoutManager* shelf_layout_manager() { | 150 internal::ShelfLayoutManager* shelf_layout_manager() { |
| (...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1580 ASSERT_TRUE(resizer.get()); | 1580 ASSERT_TRUE(resizer.get()); |
| 1581 // Move it 50 to the left, which should contract w1 and expand w2-3. | 1581 // Move it 50 to the left, which should contract w1 and expand w2-3. |
| 1582 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0); | 1582 resizer->Drag(CalculateDragPoint(*resizer, -50, 0), 0); |
| 1583 EXPECT_EQ("100,100 98x100", window_->bounds().ToString()); | 1583 EXPECT_EQ("100,100 98x100", window_->bounds().ToString()); |
| 1584 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString()); | 1584 EXPECT_EQ("198,100 101x100", window2_->bounds().ToString()); |
| 1585 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); | 1585 EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); |
| 1586 } | 1586 } |
| 1587 | 1587 |
| 1588 } // namespace internal | 1588 } // namespace internal |
| 1589 } // namespace ash | 1589 } // namespace ash |
| OLD | NEW |