| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 | 120 |
| 121 // Returns a string identifying the z-order of each of the known child windows | 121 // Returns a string identifying the z-order of each of the known child windows |
| 122 // of |parent|. The returned string constains the id of the known windows and | 122 // of |parent|. The returned string constains the id of the known windows and |
| 123 // is ordered from topmost to bottomost windows. | 123 // is ordered from topmost to bottomost windows. |
| 124 std::string WindowOrderAsString(aura::Window* parent) const { | 124 std::string WindowOrderAsString(aura::Window* parent) const { |
| 125 std::string result; | 125 std::string result; |
| 126 const aura::Window::Windows& windows = parent->children(); | 126 const aura::Window::Windows& windows = parent->children(); |
| 127 for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin(); | 127 for (aura::Window::Windows::const_reverse_iterator i = windows.rbegin(); |
| 128 i != windows.rend(); ++i) { | 128 i != windows.rend(); ++i) { |
| 129 if (*i == window_ || *i == window2_ || *i == window3_) { | 129 if (*i == window_.get() || *i == window2_.get() || *i == window3_.get()) { |
| 130 if (!result.empty()) | 130 if (!result.empty()) |
| 131 result += " "; | 131 result += " "; |
| 132 result += base::IntToString((*i)->id()); | 132 result += base::IntToString((*i)->id()); |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 return result; | 135 return result; |
| 136 } | 136 } |
| 137 | 137 |
| 138 protected: | 138 protected: |
| 139 WindowResizer* CreateResizerForTest( | 139 WindowResizer* CreateResizerForTest( |
| (...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1882 // Drag even more to snap to the edge. | 1882 // Drag even more to snap to the edge. |
| 1883 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), | 1883 generator.GestureScrollSequence(gfx::Point(400, kRootHeight - 40), |
| 1884 gfx::Point(400, kRootHeight - 25), | 1884 gfx::Point(400, kRootHeight - 25), |
| 1885 base::TimeDelta::FromMilliseconds(10), | 1885 base::TimeDelta::FromMilliseconds(10), |
| 1886 5); | 1886 5); |
| 1887 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), | 1887 EXPECT_EQ(gfx::Rect(100, 100, 600, kRootHeight - 100).ToString(), |
| 1888 touch_resize_window_->bounds().ToString()); | 1888 touch_resize_window_->bounds().ToString()); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 } // namespace ash | 1891 } // namespace ash |
| OLD | NEW |