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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ | 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_ |
6 #define ASH_TEST_ASH_TEST_BASE_H_ | 6 #define ASH_TEST_ASH_TEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. | 61 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. |
62 void UpdateDisplay(const std::string& display_specs); | 62 void UpdateDisplay(const std::string& display_specs); |
63 | 63 |
64 // Returns a root Window. Usually this is the active root Window, but that | 64 // Returns a root Window. Usually this is the active root Window, but that |
65 // method can return NULL sometimes, and in those cases, we fall back on the | 65 // method can return NULL sometimes, and in those cases, we fall back on the |
66 // primary root Window. | 66 // primary root Window. |
67 aura::Window* CurrentContext(); | 67 aura::Window* CurrentContext(); |
68 | 68 |
69 // Versions of the functions in aura::test:: that go through our shell | 69 // Versions of the functions in aura::test:: that go through our shell |
70 // StackingController instead of taking a parent. | 70 // StackingController instead of taking a parent. |
| 71 // TODO(tdanderson): Consider cleanup opportunities related to creation of |
| 72 // test windows in aura and ash. See crbug.com/483503. |
71 aura::Window* CreateTestWindowInShellWithId(int id); | 73 aura::Window* CreateTestWindowInShellWithId(int id); |
72 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); | 74 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); |
73 aura::Window* CreateTestWindowInShell(SkColor color, | 75 aura::Window* CreateTestWindowInShell(SkColor color, |
74 int id, | 76 int id, |
75 const gfx::Rect& bounds); | 77 const gfx::Rect& bounds); |
76 aura::Window* CreateTestWindowInShellWithDelegate( | 78 aura::Window* CreateTestWindowInShellWithDelegate( |
77 aura::WindowDelegate* delegate, | 79 aura::WindowDelegate* delegate, |
78 int id, | 80 int id, |
79 const gfx::Rect& bounds); | 81 const gfx::Rect& bounds); |
80 aura::Window* CreateTestWindowInShellWithDelegateAndType( | 82 aura::Window* CreateTestWindowInShellWithDelegateAndType( |
81 aura::WindowDelegate* delegate, | 83 aura::WindowDelegate* delegate, |
82 ui::wm::WindowType type, | 84 ui::wm::WindowType type, |
83 int id, | 85 int id, |
84 const gfx::Rect& bounds); | 86 const gfx::Rect& bounds); |
| 87 aura::Window* CreateTestModalWindowInShellWithBounds(const gfx::Rect& bounds); |
| 88 aura::Window* CreateTestModalWindowInShellWithDelegateAndType( |
| 89 aura::WindowDelegate* delegate, |
| 90 ui::wm::WindowType type, |
| 91 int id, |
| 92 const gfx::Rect& bounds); |
85 | 93 |
86 // Attach |window| to the current shell's root window. | 94 // Attach |window| to the current shell's root window. |
87 void ParentWindowInPrimaryRootWindow(aura::Window* window); | 95 void ParentWindowInPrimaryRootWindow(aura::Window* window); |
88 | 96 |
89 // Returns the EventGenerator that uses screen coordinates and works | 97 // Returns the EventGenerator that uses screen coordinates and works |
90 // across multiple displays. It createse a new generator if it | 98 // across multiple displays. It createse a new generator if it |
91 // hasn't been created yet. | 99 // hasn't been created yet. |
92 ui::test::EventGenerator& GetEventGenerator(); | 100 ui::test::EventGenerator& GetEventGenerator(); |
93 | 101 |
94 protected: | 102 protected: |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 ~NoSessionAshTestBase() override {} | 173 ~NoSessionAshTestBase() override {} |
166 | 174 |
167 private: | 175 private: |
168 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 176 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
169 }; | 177 }; |
170 | 178 |
171 } // namespace test | 179 } // namespace test |
172 } // namespace ash | 180 } // namespace ash |
173 | 181 |
174 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 182 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |