| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef ASH_TEST_ASH_TEST_IMPL_H_ | |
| 6 #define ASH_TEST_ASH_TEST_IMPL_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 #include <string> | |
| 10 | |
| 11 #include "ui/display/display_layout.h" | |
| 12 #include "ui/views/widget/widget.h" | |
| 13 #include "ui/wm/public/window_types.h" | |
| 14 | |
| 15 namespace display { | |
| 16 class Display; | |
| 17 } | |
| 18 | |
| 19 namespace gfx { | |
| 20 class Rect; | |
| 21 } | |
| 22 | |
| 23 namespace ash { | |
| 24 | |
| 25 class WindowOwner; | |
| 26 class WmWindow; | |
| 27 | |
| 28 // Provides the real implementation of AshTest, see it for details. | |
| 29 class AshTestImpl { | |
| 30 public: | |
| 31 virtual ~AshTestImpl() {} | |
| 32 | |
| 33 // Factory function for creating AshTestImpl. Implemention that is used | |
| 34 // depends upon build dependencies. | |
| 35 static std::unique_ptr<AshTestImpl> Create(); | |
| 36 | |
| 37 // These functions mirror that of AshTest, see it for details. | |
| 38 virtual void SetUp() = 0; | |
| 39 virtual void TearDown() = 0; | |
| 40 virtual void UpdateDisplay(const std::string& display_spec) = 0; | |
| 41 virtual std::unique_ptr<WindowOwner> CreateTestWindow( | |
| 42 const gfx::Rect& bounds_in_screen, | |
| 43 ui::wm::WindowType type, | |
| 44 int shell_window_id) = 0; | |
| 45 virtual std::unique_ptr<WindowOwner> CreateToplevelTestWindow( | |
| 46 const gfx::Rect& bounds_in_screen, | |
| 47 int shell_window_id) = 0; | |
| 48 virtual display::Display GetSecondaryDisplay() = 0; | |
| 49 virtual bool SetSecondaryDisplayPlacement( | |
| 50 display::DisplayPlacement::Position position, | |
| 51 int offset) = 0; | |
| 52 virtual void ConfigureWidgetInitParamsForDisplay( | |
| 53 WmWindow* window, | |
| 54 views::Widget::InitParams* init_params) = 0; | |
| 55 virtual void AddTransientChild(WmWindow* parent, WmWindow* window) = 0; | |
| 56 }; | |
| 57 | |
| 58 } // namespace ash | |
| 59 | |
| 60 #endif // ASH_TEST_ASH_TEST_IMPL_H_ | |
| OLD | NEW |