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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
11 #include <string> | 11 #include <string> |
12 | 12 |
| 13 #include "ash/public/cpp/shell_window_ids.h" |
13 #include "base/macros.h" | 14 #include "base/macros.h" |
14 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
15 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "third_party/skia/include/core/SkColor.h" | 18 #include "third_party/skia/include/core/SkColor.h" |
18 #include "ui/display/display.h" | 19 #include "ui/display/display.h" |
19 #include "ui/wm/public/window_types.h" | 20 #include "ui/wm/public/window_types.h" |
20 | 21 |
21 namespace aura { | 22 namespace aura { |
22 class Window; | 23 class Window; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 int container_id, | 92 int container_id, |
92 const gfx::Rect& bounds); | 93 const gfx::Rect& bounds); |
93 | 94 |
94 // Versions of the functions in aura::test:: that go through our shell | 95 // Versions of the functions in aura::test:: that go through our shell |
95 // StackingController instead of taking a parent. | 96 // StackingController instead of taking a parent. |
96 aura::Window* CreateTestWindowInShellWithId(int id); | 97 aura::Window* CreateTestWindowInShellWithId(int id); |
97 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); | 98 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); |
98 aura::Window* CreateTestWindowInShell(SkColor color, | 99 aura::Window* CreateTestWindowInShell(SkColor color, |
99 int id, | 100 int id, |
100 const gfx::Rect& bounds); | 101 const gfx::Rect& bounds); |
| 102 |
| 103 // Creates a visible window parented to |parent| with the specified bounds and |
| 104 // id. |
| 105 std::unique_ptr<aura::Window> CreateChildWindow( |
| 106 aura::Window* parent, |
| 107 const gfx::Rect& bounds = gfx::Rect(), |
| 108 int shell_window_id = kShellWindowId_Invalid); |
| 109 |
101 aura::Window* CreateTestWindowInShellWithDelegate( | 110 aura::Window* CreateTestWindowInShellWithDelegate( |
102 aura::WindowDelegate* delegate, | 111 aura::WindowDelegate* delegate, |
103 int id, | 112 int id, |
104 const gfx::Rect& bounds); | 113 const gfx::Rect& bounds); |
105 aura::Window* CreateTestWindowInShellWithDelegateAndType( | 114 aura::Window* CreateTestWindowInShellWithDelegateAndType( |
106 aura::WindowDelegate* delegate, | 115 aura::WindowDelegate* delegate, |
107 ui::wm::WindowType type, | 116 ui::wm::WindowType type, |
108 int id, | 117 int id, |
109 const gfx::Rect& bounds); | 118 const gfx::Rect& bounds); |
110 | 119 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 ~NoSessionAshTestBase() override {} | 200 ~NoSessionAshTestBase() override {} |
192 | 201 |
193 private: | 202 private: |
194 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 203 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
195 }; | 204 }; |
196 | 205 |
197 } // namespace test | 206 } // namespace test |
198 } // namespace ash | 207 } // namespace ash |
199 | 208 |
200 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 209 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
OLD | NEW |