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 SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ | 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ |
6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ | 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <set> | 10 #include <set> |
(...skipping 12 matching lines...) Expand all Loading... |
23 class PlatformScreenImplOzone : public PlatformScreen, | 23 class PlatformScreenImplOzone : public PlatformScreen, |
24 public ui::DisplayConfigurator::Observer { | 24 public ui::DisplayConfigurator::Observer { |
25 public: | 25 public: |
26 PlatformScreenImplOzone(); | 26 PlatformScreenImplOzone(); |
27 ~PlatformScreenImplOzone() override; | 27 ~PlatformScreenImplOzone() override; |
28 | 28 |
29 private: | 29 private: |
30 // PlatformScreen: | 30 // PlatformScreen: |
31 void Init() override; // Must not be called until after the ozone platform is | 31 void Init() override; // Must not be called until after the ozone platform is |
32 // initialized. | 32 // initialized. |
33 void ConfigurePhysicalDisplay( | 33 void ConfigureDisplays(PlatformScreenDelegate* delegate) override; |
34 const ConfiguredDisplayCallback& callback) override; | |
35 int64_t GetPrimaryDisplayId() const override; | 34 int64_t GetPrimaryDisplayId() const override; |
36 | 35 |
37 // ui::DisplayConfigurator::Observer: | 36 // ui::DisplayConfigurator::Observer: |
38 void OnDisplayModeChanged( | 37 void OnDisplayModeChanged( |
39 const ui::DisplayConfigurator::DisplayStateList& displays) override; | 38 const ui::DisplayConfigurator::DisplayStateList& displays) override; |
40 void OnDisplayModeChangeFailed( | 39 void OnDisplayModeChangeFailed( |
41 const ui::DisplayConfigurator::DisplayStateList& displays, | 40 const ui::DisplayConfigurator::DisplayStateList& displays, |
42 ui::MultipleDisplayState failed_new_state) override; | 41 ui::MultipleDisplayState failed_new_state) override; |
43 | 42 |
| 43 PlatformScreenDelegate* delegate_ = nullptr; |
44 ui::DisplayConfigurator display_configurator_; | 44 ui::DisplayConfigurator display_configurator_; |
45 | 45 |
46 // TODO(kylechar): These values can/should be replaced by DisplayLayout. | 46 // TODO(kylechar): These values can/should be replaced by DisplayLayout. |
47 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; | 47 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; |
48 std::set<uint64_t> displays_; | 48 std::set<uint64_t> displays_; |
49 gfx::Point next_display_origin_; | 49 gfx::Point next_display_origin_; |
50 | 50 |
51 // Callback for when new displays are configured. | |
52 ConfiguredDisplayCallback callback_; | |
53 | |
54 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); | 51 DISALLOW_COPY_AND_ASSIGN(PlatformScreenImplOzone); |
55 }; | 52 }; |
56 | 53 |
57 } // namespace display | 54 } // namespace display |
58 | 55 |
59 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ | 56 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_IMPL_OZONE_H_ |
OLD | NEW |