OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/window_cycle_controller.h" | 5 #include "ash/wm/window_cycle_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "ash/focus_cycler.h" | 10 #include "ash/focus_cycler.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 void OnMouseEvent(ui::MouseEvent* event) override { mouse_events_++; } | 66 void OnMouseEvent(ui::MouseEvent* event) override { mouse_events_++; } |
67 | 67 |
68 private: | 68 private: |
69 int key_events_; | 69 int key_events_; |
70 int mouse_events_; | 70 int mouse_events_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(EventCounter); | 72 DISALLOW_COPY_AND_ASSIGN(EventCounter); |
73 }; | 73 }; |
74 | 74 |
75 bool IsWindowMinimized(aura::Window* window) { | 75 bool IsWindowMinimized(aura::Window* window) { |
76 return WmWindow::Get(window)->GetWindowState()->IsMinimized(); | 76 return wm::GetWindowState(window)->IsMinimized(); |
77 } | 77 } |
78 | 78 |
79 } // namespace | 79 } // namespace |
80 | 80 |
81 using aura::test::CreateTestWindowWithId; | 81 using aura::test::CreateTestWindowWithId; |
82 using aura::test::TestWindowDelegate; | 82 using aura::test::TestWindowDelegate; |
83 using aura::Window; | 83 using aura::Window; |
84 | 84 |
85 class WindowCycleControllerTest : public test::AshTestBase { | 85 class WindowCycleControllerTest : public test::AshTestBase { |
86 public: | 86 public: |
(...skipping 12 matching lines...) Expand all Loading... |
99 | 99 |
100 aura::Window* CreatePanelWindow() { | 100 aura::Window* CreatePanelWindow() { |
101 gfx::Rect rect(100, 100); | 101 gfx::Rect rect(100, 100); |
102 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( | 102 aura::Window* window = CreateTestWindowInShellWithDelegateAndType( |
103 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, rect); | 103 NULL, ui::wm::WINDOW_TYPE_PANEL, 0, rect); |
104 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); | 104 shelf_view_test_->RunMessageLoopUntilAnimationsDone(); |
105 return window; | 105 return window; |
106 } | 106 } |
107 | 107 |
108 const aura::Window::Windows GetWindows(WindowCycleController* controller) { | 108 const aura::Window::Windows GetWindows(WindowCycleController* controller) { |
109 return WmWindow::ToAuraWindows(controller->window_cycle_list()->windows()); | 109 return controller->window_cycle_list()->windows(); |
110 } | 110 } |
111 | 111 |
112 const views::Widget* GetWindowCycleListWidget() const { | 112 const views::Widget* GetWindowCycleListWidget() const { |
113 return Shell::Get() | 113 return Shell::Get() |
114 ->window_cycle_controller() | 114 ->window_cycle_controller() |
115 ->window_cycle_list() | 115 ->window_cycle_list() |
116 ->widget(); | 116 ->widget(); |
117 } | 117 } |
118 | 118 |
119 private: | 119 private: |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 // Base case sets the expectation for other cases. | 761 // Base case sets the expectation for other cases. |
762 if (expected_bounds.IsEmpty()) | 762 if (expected_bounds.IsEmpty()) |
763 expected_bounds = display_relative_bounds; | 763 expected_bounds = display_relative_bounds; |
764 else | 764 else |
765 EXPECT_EQ(expected_bounds, display_relative_bounds); | 765 EXPECT_EQ(expected_bounds, display_relative_bounds); |
766 controller->CompleteCycling(); | 766 controller->CompleteCycling(); |
767 } | 767 } |
768 } | 768 } |
769 | 769 |
770 } // namespace ash | 770 } // namespace ash |
OLD | NEW |