| 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/wm/workspace_controller.h" | 5 #include "ash/wm/workspace_controller.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| 11 #include "ash/session/session_controller.h" | 11 #include "ash/session/session_controller.h" |
| 12 #include "ash/shelf/shelf_layout_manager.h" | 12 #include "ash/shelf/shelf_layout_manager.h" |
| 13 #include "ash/shelf/shelf_widget.h" | 13 #include "ash/shelf/shelf_widget.h" |
| 14 #include "ash/shelf/wm_shelf.h" | 14 #include "ash/shelf/wm_shelf.h" |
| 15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
| 16 #include "ash/system/status_area_widget.h" | 16 #include "ash/system/status_area_widget.h" |
| 17 #include "ash/test/ash_test_base.h" | 17 #include "ash/test/ash_test_base.h" |
| 18 #include "ash/test/shell_test_api.h" | 18 #include "ash/test/shell_test_api.h" |
| 19 #include "ash/test/test_shelf_delegate.h" | |
| 20 #include "ash/wm/panels/panel_layout_manager.h" | 19 #include "ash/wm/panels/panel_layout_manager.h" |
| 21 #include "ash/wm/window_state.h" | 20 #include "ash/wm/window_state.h" |
| 22 #include "ash/wm/window_state_aura.h" | 21 #include "ash/wm/window_state_aura.h" |
| 23 #include "ash/wm/window_util.h" | 22 #include "ash/wm/window_util.h" |
| 24 #include "ash/wm/wm_event.h" | 23 #include "ash/wm/wm_event.h" |
| 25 #include "ash/wm/workspace/workspace_window_resizer.h" | 24 #include "ash/wm/workspace/workspace_window_resizer.h" |
| 26 #include "ash/wm_window.h" | 25 #include "ash/wm_window.h" |
| 27 #include "base/strings/string_number_conversions.h" | 26 #include "base/strings/string_number_conversions.h" |
| 28 #include "ui/aura/client/aura_constants.h" | 27 #include "ui/aura/client/aura_constants.h" |
| 29 #include "ui/aura/test/test_window_delegate.h" | 28 #include "ui/aura/test/test_window_delegate.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); | 112 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); |
| 114 window->Show(); | 113 window->Show(); |
| 115 return window; | 114 return window; |
| 116 } | 115 } |
| 117 | 116 |
| 118 aura::Window* CreateTestPanel(aura::WindowDelegate* delegate, | 117 aura::Window* CreateTestPanel(aura::WindowDelegate* delegate, |
| 119 const gfx::Rect& bounds) { | 118 const gfx::Rect& bounds) { |
| 120 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 119 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 121 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); | 120 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); |
| 122 WmWindow* wm_window = WmWindow::Get(window); | 121 WmWindow* wm_window = WmWindow::Get(window); |
| 123 test::TestShelfDelegate::instance()->AddShelfItem(wm_window); | |
| 124 PanelLayoutManager::Get(wm_window)->Relayout(); | 122 PanelLayoutManager::Get(wm_window)->Relayout(); |
| 125 return window; | 123 return window; |
| 126 } | 124 } |
| 127 | 125 |
| 128 aura::Window* GetDesktop() { | 126 aura::Window* GetDesktop() { |
| 129 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 127 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
| 130 kShellWindowId_DefaultContainer); | 128 kShellWindowId_DefaultContainer); |
| 131 } | 129 } |
| 132 | 130 |
| 133 gfx::Rect GetFullscreenBounds(aura::Window* window) { | 131 gfx::Rect GetFullscreenBounds(aura::Window* window) { |
| (...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); | 1534 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); |
| 1537 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); | 1535 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); |
| 1538 if (points[i].is_target_hit) | 1536 if (points[i].is_target_hit) |
| 1539 EXPECT_EQ(window.get(), target); | 1537 EXPECT_EQ(window.get(), target); |
| 1540 else | 1538 else |
| 1541 EXPECT_NE(window.get(), target); | 1539 EXPECT_NE(window.get(), target); |
| 1542 } | 1540 } |
| 1543 } | 1541 } |
| 1544 | 1542 |
| 1545 } // namespace ash | 1543 } // namespace ash |
| OLD | NEW |