| 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 13 matching lines...) Expand all Loading... |
| 24 class WidgetDelegate; | 24 class WidgetDelegate; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace ash { | 27 namespace ash { |
| 28 | 28 |
| 29 class AshTestImpl; | 29 class AshTestImpl; |
| 30 class SystemTray; | 30 class SystemTray; |
| 31 class WmShelf; | 31 class WmShelf; |
| 32 class WmWindow; | 32 class WmWindow; |
| 33 | 33 |
| 34 namespace test { |
| 35 class TestSystemTrayDelegate; |
| 36 } |
| 37 |
| 34 // Wraps a WmWindow calling WmWindow::Destroy() from the destructor. WmWindow is | 38 // Wraps a WmWindow calling WmWindow::Destroy() from the destructor. WmWindow is |
| 35 // owned by the corresponding window implementation. The only way to delete | 39 // owned by the corresponding window implementation. The only way to delete |
| 36 // WmWindow is to call WmWindow::Destroy(), which deletes the corresponding | 40 // WmWindow is to call WmWindow::Destroy(), which deletes the corresponding |
| 37 // window, then the WmWindow. This class calls WmWindow::Destroy() from its | 41 // window, then the WmWindow. This class calls WmWindow::Destroy() from its |
| 38 // destructor. | 42 // destructor. |
| 39 class WindowOwner { | 43 class WindowOwner { |
| 40 public: | 44 public: |
| 41 explicit WindowOwner(WmWindow* window); | 45 explicit WindowOwner(WmWindow* window); |
| 42 ~WindowOwner(); | 46 ~WindowOwner(); |
| 43 | 47 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 60 public: | 64 public: |
| 61 AshTest(); | 65 AshTest(); |
| 62 ~AshTest() override; | 66 ~AshTest() override; |
| 63 | 67 |
| 64 // Returns the WmShelf for the primary display. | 68 // Returns the WmShelf for the primary display. |
| 65 static WmShelf* GetPrimaryShelf(); | 69 static WmShelf* GetPrimaryShelf(); |
| 66 | 70 |
| 67 // Returns the system tray on the primary display. | 71 // Returns the system tray on the primary display. |
| 68 static SystemTray* GetPrimarySystemTray(); | 72 static SystemTray* GetPrimarySystemTray(); |
| 69 | 73 |
| 74 static test::TestSystemTrayDelegate* GetSystemTrayDelegate(); |
| 75 |
| 70 bool SupportsMultipleDisplays() const; | 76 bool SupportsMultipleDisplays() const; |
| 71 | 77 |
| 72 // Update the display configuration as given in |display_spec|. | 78 // Update the display configuration as given in |display_spec|. |
| 73 // See test::DisplayManagerTestApi::UpdateDisplay for more details. | 79 // See test::DisplayManagerTestApi::UpdateDisplay for more details. |
| 74 void UpdateDisplay(const std::string& display_spec); | 80 void UpdateDisplay(const std::string& display_spec); |
| 75 | 81 |
| 76 // Creates a visible window in the appropriate container. If | 82 // Creates a visible window in the appropriate container. If |
| 77 // |bounds_in_screen| is empty the window is added to the primary root | 83 // |bounds_in_screen| is empty the window is added to the primary root |
| 78 // window, otherwise the window is added to the display matching | 84 // window, otherwise the window is added to the display matching |
| 79 // |bounds_in_screen|. |shell_window_id| is the shell window id to give to | 85 // |bounds_in_screen|. |shell_window_id| is the shell window id to give to |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 142 |
| 137 private: | 143 private: |
| 138 std::unique_ptr<AshTestImpl> test_impl_; | 144 std::unique_ptr<AshTestImpl> test_impl_; |
| 139 | 145 |
| 140 DISALLOW_COPY_AND_ASSIGN(AshTest); | 146 DISALLOW_COPY_AND_ASSIGN(AshTest); |
| 141 }; | 147 }; |
| 142 | 148 |
| 143 } // namespace ash | 149 } // namespace ash |
| 144 | 150 |
| 145 #endif // ASH_COMMON_TEST_ASH_TEST_H_ | 151 #endif // ASH_COMMON_TEST_ASH_TEST_H_ |
| OLD | NEW |