OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_COMMON_TEST_ASH_TEST_H_ | 5 #ifndef ASH_COMMON_TEST_ASH_TEST_H_ |
6 #define ASH_COMMON_TEST_ASH_TEST_H_ | 6 #define ASH_COMMON_TEST_ASH_TEST_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "ash/common/shell_window_ids.h" | 11 #include "ash/public/cpp/shell_window_ids.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/display/manager/display_layout.h" | 14 #include "ui/display/manager/display_layout.h" |
15 #include "ui/gfx/geometry/rect.h" | 15 #include "ui/gfx/geometry/rect.h" |
16 #include "ui/views/widget/widget.h" | 16 #include "ui/views/widget/widget.h" |
17 #include "ui/wm/public/window_types.h" | 17 #include "ui/wm/public/window_types.h" |
18 | 18 |
19 namespace display { | 19 namespace display { |
20 class Display; | 20 class Display; |
21 } | 21 } |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 const gfx::Rect& bounds_in_screen = gfx::Rect(), | 96 const gfx::Rect& bounds_in_screen = gfx::Rect(), |
97 int shell_window_id = kShellWindowId_Invalid); | 97 int shell_window_id = kShellWindowId_Invalid); |
98 | 98 |
99 // Creates a visible window parented to |parent| with the specified bounds and | 99 // Creates a visible window parented to |parent| with the specified bounds and |
100 // id. | 100 // id. |
101 std::unique_ptr<WindowOwner> CreateChildWindow( | 101 std::unique_ptr<WindowOwner> CreateChildWindow( |
102 WmWindow* parent, | 102 WmWindow* parent, |
103 const gfx::Rect& bounds = gfx::Rect(), | 103 const gfx::Rect& bounds = gfx::Rect(), |
104 int shell_window_id = kShellWindowId_Invalid); | 104 int shell_window_id = kShellWindowId_Invalid); |
105 | 105 |
106 // Creates and shows a widget. See ash/common/shell_window_ids.h for values | 106 // Creates and shows a widget. See ash/public/cpp/shell_window_ids.h for |
107 // for |container_id|. | 107 // values for |container_id|. |
108 static std::unique_ptr<views::Widget> CreateTestWidget( | 108 static std::unique_ptr<views::Widget> CreateTestWidget( |
109 const gfx::Rect& bounds, | 109 const gfx::Rect& bounds, |
110 views::WidgetDelegate* delegate = nullptr, | 110 views::WidgetDelegate* delegate = nullptr, |
111 int container_id = kShellWindowId_DefaultContainer); | 111 int container_id = kShellWindowId_DefaultContainer); |
112 | 112 |
113 // Returns the Display for the secondary display. It's assumed there are two | 113 // Returns the Display for the secondary display. It's assumed there are two |
114 // displays. | 114 // displays. |
115 display::Display GetSecondaryDisplay(); | 115 display::Display GetSecondaryDisplay(); |
116 | 116 |
117 // Sets the placement of the secondary display. Returns true if the secondary | 117 // Sets the placement of the secondary display. Returns true if the secondary |
(...skipping 24 matching lines...) Expand all Loading... |
142 | 142 |
143 private: | 143 private: |
144 std::unique_ptr<AshTestImpl> test_impl_; | 144 std::unique_ptr<AshTestImpl> test_impl_; |
145 | 145 |
146 DISALLOW_COPY_AND_ASSIGN(AshTest); | 146 DISALLOW_COPY_AND_ASSIGN(AshTest); |
147 }; | 147 }; |
148 | 148 |
149 } // namespace ash | 149 } // namespace ash |
150 | 150 |
151 #endif // ASH_COMMON_TEST_ASH_TEST_H_ | 151 #endif // ASH_COMMON_TEST_ASH_TEST_H_ |
OLD | NEW |