| 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 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 // Creates a top level visible window in the appropriate container. If | 63 // Creates a top level visible window in the appropriate container. If |
| 64 // |bounds_in_screen| is empty the window is added to the primary root window, | 64 // |bounds_in_screen| is empty the window is added to the primary root window, |
| 65 // otherwise the window is added to the display matching |bounds_in_screen|. | 65 // otherwise the window is added to the display matching |bounds_in_screen|. |
| 66 // |shell_window_id| is the shell window id to give to the new window. | 66 // |shell_window_id| is the shell window id to give to the new window. |
| 67 std::unique_ptr<WindowOwner> CreateTestWindow( | 67 std::unique_ptr<WindowOwner> CreateTestWindow( |
| 68 const gfx::Rect& bounds_in_screen = gfx::Rect(), | 68 const gfx::Rect& bounds_in_screen = gfx::Rect(), |
| 69 ui::wm::WindowType type = ui::wm::WINDOW_TYPE_NORMAL, | 69 ui::wm::WindowType type = ui::wm::WINDOW_TYPE_NORMAL, |
| 70 int shell_window_id = kShellWindowId_Invalid); | 70 int shell_window_id = kShellWindowId_Invalid); |
| 71 | 71 |
| 72 // Returns the Display for the secondary display. It's assumed there is two | 72 // Creates a visible window parented to |parent| with the specified bounds and |
| 73 // id. |
| 74 std::unique_ptr<WindowOwner> CreateChildWindow( |
| 75 WmWindow* parent, |
| 76 const gfx::Rect& bounds = gfx::Rect(), |
| 77 int shell_window_id = kShellWindowId_Invalid); |
| 78 |
| 79 // Returns the Display for the secondary display. It's assumed there are two |
| 73 // displays. | 80 // displays. |
| 74 display::Display GetSecondaryDisplay(); | 81 display::Display GetSecondaryDisplay(); |
| 75 | 82 |
| 76 // Sets the placement of the secondary display. Returns true if the secondary | 83 // Sets the placement of the secondary display. Returns true if the secondary |
| 77 // display can be moved, false otherwise. The false return value is temporary | 84 // display can be moved, false otherwise. The false return value is temporary |
| 78 // until mus fully supports this. | 85 // until mus fully supports this. |
| 79 bool SetSecondaryDisplayPlacement( | 86 bool SetSecondaryDisplayPlacement( |
| 80 display::DisplayPlacement::Position position, | 87 display::DisplayPlacement::Position position, |
| 81 int offset); | 88 int offset); |
| 82 | 89 |
| 83 protected: | 90 protected: |
| 84 // testing::Test: | 91 // testing::Test: |
| 85 void SetUp() override; | 92 void SetUp() override; |
| 86 void TearDown() override; | 93 void TearDown() override; |
| 87 | 94 |
| 88 private: | 95 private: |
| 89 std::unique_ptr<AshTestImpl> test_impl_; | 96 std::unique_ptr<AshTestImpl> test_impl_; |
| 90 | 97 |
| 91 DISALLOW_COPY_AND_ASSIGN(AshTest); | 98 DISALLOW_COPY_AND_ASSIGN(AshTest); |
| 92 }; | 99 }; |
| 93 | 100 |
| 94 } // namespace ash | 101 } // namespace ash |
| 95 | 102 |
| 96 #endif // ASH_COMMON_TEST_ASH_TEST_H_ | 103 #endif // ASH_COMMON_TEST_ASH_TEST_H_ |
| OLD | NEW |