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 SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ | |
6 #define SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ | |
7 | |
8 #include <stdint.h> | |
9 | |
10 #include <vector> | |
11 | |
12 #include "base/callback.h" | |
13 #include "base/macros.h" | |
14 #include "services/ui/ws/platform_screen.h" | |
15 #include "ui/display/chromeos/display_configurator.h" | |
16 | |
17 namespace ui { | |
18 namespace ws { | |
19 | |
20 // PlatformScreenImplOzone provides the necessary functionality to configure all | |
21 // attached physical displays on the ozone platform. | |
22 class PlatformScreenImplOzone : public PlatformScreen, | |
23 public ui::DisplayConfigurator::Observer { | |
24 public: | |
25 PlatformScreenImplOzone(); | |
26 ~PlatformScreenImplOzone() override; | |
27 | |
28 private: | |
29 // PlatformScreen: | |
30 void Init() override; // Must not be called until after the ozone platform is | |
31 // initialized. | |
32 void ConfigurePhysicalDisplay( | |
33 const ConfiguredDisplayCallback& callback) override; | |
34 | |
35 // ui::DisplayConfigurator::Observer: | |
36 void OnDisplayModeChanged( | |
37 const ui::DisplayConfigurator::DisplayStateList& displays) override; | |
38 void OnDisplayModeChangeFailed( | |
39 const ui::DisplayConfigurator::DisplayStateList& displays, | |
40 MultipleDisplayState failed_new_state) override; | |
41 | |
42 ui::DisplayConfigurator display_configurator_; | |
43 | |
44 // Callback to called when new displays are configured. | |
45 ConfiguredDisplayCallback callback_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); | |
48 }; | |
49 | |
50 } // namespace ws | |
51 } // namespace ui | |
52 | |
53 #endif // SERVICES_UI_WS_PLATFORM_SCREEN_IMPL_OZONE_H_ | |
OLD | NEW |