| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/common/wm/workspace_controller.h" | 5 #include "ash/common/wm/workspace_controller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "ash/aura/wm_window_aura.h" | 9 #include "ash/aura/wm_window_aura.h" |
| 10 #include "ash/common/shelf/shelf_layout_manager.h" | 10 #include "ash/common/shelf/shelf_layout_manager.h" |
| 11 #include "ash/common/shelf/shelf_widget.h" | 11 #include "ash/common/shelf/shelf_widget.h" |
| 12 #include "ash/common/shelf/wm_shelf.h" | 12 #include "ash/common/shelf/wm_shelf.h" |
| 13 #include "ash/common/shell_window_ids.h" | 13 #include "ash/common/shell_window_ids.h" |
| 14 #include "ash/common/system/status_area_widget.h" | 14 #include "ash/common/system/status_area_widget.h" |
| 15 #include "ash/common/wm/panels/panel_layout_manager.h" | 15 #include "ash/common/wm/panels/panel_layout_manager.h" |
| 16 #include "ash/common/wm/window_state.h" | 16 #include "ash/common/wm/window_state.h" |
| 17 #include "ash/common/wm/workspace/workspace_window_resizer.h" | 17 #include "ash/common/wm/workspace/workspace_window_resizer.h" |
| 18 #include "ash/root_window_controller.h" | |
| 19 #include "ash/screen_util.h" | 18 #include "ash/screen_util.h" |
| 20 #include "ash/shell.h" | 19 #include "ash/shell.h" |
| 21 #include "ash/test/ash_md_test_base.h" | 20 #include "ash/test/ash_md_test_base.h" |
| 22 #include "ash/test/shell_test_api.h" | 21 #include "ash/test/shell_test_api.h" |
| 23 #include "ash/test/test_shelf_delegate.h" | 22 #include "ash/test/test_shelf_delegate.h" |
| 24 #include "ash/wm/window_state_aura.h" | 23 #include "ash/wm/window_state_aura.h" |
| 25 #include "ash/wm/window_util.h" | 24 #include "ash/wm/window_util.h" |
| 26 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
| 27 #include "ui/aura/client/aura_constants.h" | 26 #include "ui/aura/client/aura_constants.h" |
| 28 #include "ui/aura/test/test_window_delegate.h" | 27 #include "ui/aura/test/test_window_delegate.h" |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 134 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
| 136 kShellWindowId_DefaultContainer); | 135 kShellWindowId_DefaultContainer); |
| 137 } | 136 } |
| 138 | 137 |
| 139 gfx::Rect GetFullscreenBounds(aura::Window* window) { | 138 gfx::Rect GetFullscreenBounds(aura::Window* window) { |
| 140 return display::Screen::GetScreen() | 139 return display::Screen::GetScreen() |
| 141 ->GetDisplayNearestWindow(window) | 140 ->GetDisplayNearestWindow(window) |
| 142 .bounds(); | 141 .bounds(); |
| 143 } | 142 } |
| 144 | 143 |
| 145 ShelfWidget* shelf_widget() { | 144 ShelfWidget* shelf_widget() { return GetPrimaryShelf()->shelf_widget(); } |
| 146 return Shell::GetPrimaryRootWindowController()->shelf_widget(); | |
| 147 } | |
| 148 | 145 |
| 149 ShelfLayoutManager* shelf_layout_manager() { | 146 ShelfLayoutManager* shelf_layout_manager() { |
| 150 return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager(); | 147 return GetPrimaryShelf()->shelf_layout_manager(); |
| 151 } | 148 } |
| 152 | 149 |
| 153 bool GetWindowOverlapsShelf() { | 150 bool GetWindowOverlapsShelf() { |
| 154 return shelf_layout_manager()->window_overlaps_shelf(); | 151 return shelf_layout_manager()->window_overlaps_shelf(); |
| 155 } | 152 } |
| 156 | 153 |
| 157 private: | 154 private: |
| 158 DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTest); | 155 DISALLOW_COPY_AND_ASSIGN(WorkspaceControllerTest); |
| 159 }; | 156 }; |
| 160 | 157 |
| (...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 ui::EventTimeForNow()); | 1613 ui::EventTimeForNow()); |
| 1617 target = targeter->FindTargetForEvent(root, &touch); | 1614 target = targeter->FindTargetForEvent(root, &touch); |
| 1618 if (points[i].is_target_hit) | 1615 if (points[i].is_target_hit) |
| 1619 EXPECT_EQ(window.get(), target); | 1616 EXPECT_EQ(window.get(), target); |
| 1620 else | 1617 else |
| 1621 EXPECT_NE(window.get(), target); | 1618 EXPECT_NE(window.get(), target); |
| 1622 } | 1619 } |
| 1623 } | 1620 } |
| 1624 | 1621 |
| 1625 } // namespace ash | 1622 } // namespace ash |
| OLD | NEW |