| 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 "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/threading/thread.h" | 16 #include "base/threading/thread.h" |
| 17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 #include "third_party/skia/include/core/SkColor.h" | 19 #include "third_party/skia/include/core/SkColor.h" |
| 20 #include "ui/display/display.h" | 20 #include "ui/display/display.h" |
| 21 #include "ui/wm/public/window_types.h" | 21 #include "ui/wm/public/window_types.h" |
| 22 | 22 |
| 23 #if defined(OS_WIN) | 23 #if defined(OS_WIN) |
| 24 #include "ui/base/win/scoped_ole_initializer.h" | 24 #include "ui/base/win/scoped_ole_initializer.h" |
| 25 #endif | 25 #endif |
| 26 | 26 |
| 27 namespace aura { |
| 28 class RootWindow; |
| 29 class Window; |
| 30 class WindowDelegate; |
| 31 } // namespace aura |
| 32 |
| 27 namespace gfx { | 33 namespace gfx { |
| 28 class Rect; | 34 class Rect; |
| 29 } | 35 } |
| 30 | 36 |
| 31 namespace ui { | 37 namespace ui { |
| 32 namespace test { | 38 namespace test { |
| 33 class EventGenerator; | 39 class EventGenerator; |
| 34 } | 40 } |
| 35 } | 41 } |
| 36 | 42 |
| 37 namespace aura { | 43 namespace views { |
| 38 class RootWindow; | 44 class Widget; |
| 39 class Window; | 45 class WidgetDelegate; |
| 40 class WindowDelegate; | 46 } |
| 41 } // namespace aura | |
| 42 | 47 |
| 43 namespace ash { | 48 namespace ash { |
| 44 class DisplayManager; | 49 class DisplayManager; |
| 45 class SystemTray; | 50 class SystemTray; |
| 46 class WmShelf; | 51 class WmShelf; |
| 47 | 52 |
| 48 namespace test { | 53 namespace test { |
| 49 | 54 |
| 50 class AshTestHelper; | 55 class AshTestHelper; |
| 51 class TestScreenshotDelegate; | 56 class TestScreenshotDelegate; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 68 | 73 |
| 69 // Update the display configuration as given in |display_specs|. | 74 // Update the display configuration as given in |display_specs|. |
| 70 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. | 75 // See ash::test::DisplayManagerTestApi::UpdateDisplay for more details. |
| 71 void UpdateDisplay(const std::string& display_specs); | 76 void UpdateDisplay(const std::string& display_specs); |
| 72 | 77 |
| 73 // Returns a root Window. Usually this is the active root Window, but that | 78 // Returns a root Window. Usually this is the active root Window, but that |
| 74 // method can return NULL sometimes, and in those cases, we fall back on the | 79 // method can return NULL sometimes, and in those cases, we fall back on the |
| 75 // primary root Window. | 80 // primary root Window. |
| 76 aura::Window* CurrentContext(); | 81 aura::Window* CurrentContext(); |
| 77 | 82 |
| 83 // Creates and shows a widget. See ash/common/shell_window_ids.h for values |
| 84 // for |container_id|. |
| 85 static std::unique_ptr<views::Widget> CreateTestWidget( |
| 86 views::WidgetDelegate* delegate, |
| 87 int container_id, |
| 88 const gfx::Rect& bounds); |
| 89 |
| 78 // Versions of the functions in aura::test:: that go through our shell | 90 // Versions of the functions in aura::test:: that go through our shell |
| 79 // StackingController instead of taking a parent. | 91 // StackingController instead of taking a parent. |
| 80 aura::Window* CreateTestWindowInShellWithId(int id); | 92 aura::Window* CreateTestWindowInShellWithId(int id); |
| 81 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); | 93 aura::Window* CreateTestWindowInShellWithBounds(const gfx::Rect& bounds); |
| 82 aura::Window* CreateTestWindowInShell(SkColor color, | 94 aura::Window* CreateTestWindowInShell(SkColor color, |
| 83 int id, | 95 int id, |
| 84 const gfx::Rect& bounds); | 96 const gfx::Rect& bounds); |
| 85 aura::Window* CreateTestWindowInShellWithDelegate( | 97 aura::Window* CreateTestWindowInShellWithDelegate( |
| 86 aura::WindowDelegate* delegate, | 98 aura::WindowDelegate* delegate, |
| 87 int id, | 99 int id, |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 ~NoSessionAshTestBase() override {} | 186 ~NoSessionAshTestBase() override {} |
| 175 | 187 |
| 176 private: | 188 private: |
| 177 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 189 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
| 178 }; | 190 }; |
| 179 | 191 |
| 180 } // namespace test | 192 } // namespace test |
| 181 } // namespace ash | 193 } // namespace ash |
| 182 | 194 |
| 183 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 195 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
| OLD | NEW |