| 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" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 aura::Window* CreatePopupLikeWindow(const gfx::Rect& bounds) { | 110 aura::Window* CreatePopupLikeWindow(const gfx::Rect& bounds) { |
| 111 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); | 111 aura::Window* window = CreateTestWindowInShellWithBounds(bounds); |
| 112 window->Show(); | 112 window->Show(); |
| 113 return window; | 113 return window; |
| 114 } | 114 } |
| 115 | 115 |
| 116 aura::Window* CreateTestPanel(aura::WindowDelegate* delegate, | 116 aura::Window* CreateTestPanel(aura::WindowDelegate* delegate, |
| 117 const gfx::Rect& bounds) { | 117 const gfx::Rect& bounds) { |
| 118 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 118 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
| 119 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); | 119 delegate, ui::wm::WINDOW_TYPE_PANEL, 0, bounds); |
| 120 WmWindow* wm_window = WmWindow::Get(window); | 120 PanelLayoutManager::Get(window)->Relayout(); |
| 121 PanelLayoutManager::Get(wm_window)->Relayout(); | |
| 122 return window; | 121 return window; |
| 123 } | 122 } |
| 124 | 123 |
| 125 aura::Window* GetDesktop() { | 124 aura::Window* GetDesktop() { |
| 126 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), | 125 return Shell::GetContainer(Shell::GetPrimaryRootWindow(), |
| 127 kShellWindowId_DefaultContainer); | 126 kShellWindowId_DefaultContainer); |
| 128 } | 127 } |
| 129 | 128 |
| 130 gfx::Rect GetFullscreenBounds(aura::Window* window) { | 129 gfx::Rect GetFullscreenBounds(aura::Window* window) { |
| 131 return display::Screen::GetScreen() | 130 return display::Screen::GetScreen() |
| (...skipping 1401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); | 1532 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); |
| 1534 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); | 1533 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); |
| 1535 if (points[i].is_target_hit) | 1534 if (points[i].is_target_hit) |
| 1536 EXPECT_EQ(window.get(), target); | 1535 EXPECT_EQ(window.get(), target); |
| 1537 else | 1536 else |
| 1538 EXPECT_NE(window.get(), target); | 1537 EXPECT_NE(window.get(), target); |
| 1539 } | 1538 } |
| 1540 } | 1539 } |
| 1541 | 1540 |
| 1542 } // namespace ash | 1541 } // namespace ash |
| OLD | NEW |