| 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_OZONE_H_ | 5 #ifndef SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ |
| 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ | 6 #define SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "mojo/public/cpp/bindings/binding_set.h" | 15 #include "mojo/public/cpp/bindings/binding_set.h" |
| 16 #include "services/shell/public/cpp/connection.h" | 16 #include "services/shell/public/cpp/connection.h" |
| 17 #include "services/shell/public/cpp/interface_factory.h" | 17 #include "services/shell/public/cpp/interface_factory.h" |
| 18 #include "services/ui/display/platform_screen.h" | 18 #include "services/ui/display/platform_screen.h" |
| 19 #include "services/ui/public/interfaces/display/display_controller.mojom.h" | 19 #include "services/ui/public/interfaces/display/display_controller.mojom.h" |
| 20 #include "ui/display/chromeos/display_configurator.h" | 20 #include "ui/display/chromeos/display_configurator.h" |
| 21 #include "ui/display/display.h" | 21 #include "ui/display/display.h" |
| 22 #include "ui/display/types/virtual_display_controller.h" |
| 22 | 23 |
| 23 namespace display { | 24 namespace display { |
| 24 | 25 |
| 25 // PlatformScreenOzone provides the necessary functionality to configure all | 26 // PlatformScreenOzone provides the necessary functionality to configure all |
| 26 // attached physical displays on the ozone platform. | 27 // attached physical displays on the ozone platform. |
| 27 class PlatformScreenOzone | 28 class PlatformScreenOzone |
| 28 : public PlatformScreen, | 29 : public PlatformScreen, |
| 29 public ui::DisplayConfigurator::Observer, | 30 public ui::DisplayConfigurator::Observer, |
| 30 public shell::InterfaceFactory<mojom::DisplayController>, | 31 public shell::InterfaceFactory<mojom::DisplayController>, |
| 31 public mojom::DisplayController { | 32 public mojom::DisplayController { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 const ui::DisplayConfigurator::DisplayStateList& displays, | 96 const ui::DisplayConfigurator::DisplayStateList& displays, |
| 96 ui::MultipleDisplayState failed_new_state) override; | 97 ui::MultipleDisplayState failed_new_state) override; |
| 97 | 98 |
| 98 // mojo::InterfaceFactory<mojom::DisplayController>: | 99 // mojo::InterfaceFactory<mojom::DisplayController>: |
| 99 void Create(const shell::Identity& remote_identity, | 100 void Create(const shell::Identity& remote_identity, |
| 100 mojom::DisplayControllerRequest request) override; | 101 mojom::DisplayControllerRequest request) override; |
| 101 | 102 |
| 102 ui::DisplayConfigurator display_configurator_; | 103 ui::DisplayConfigurator display_configurator_; |
| 103 PlatformScreenDelegate* delegate_ = nullptr; | 104 PlatformScreenDelegate* delegate_ = nullptr; |
| 104 | 105 |
| 106 // If not null it provides a way to modify the virtual display state for |
| 107 // running off device. |
| 108 VirtualDisplayController* virtual_display_controller_ = nullptr; |
| 109 |
| 105 // TODO(kylechar): These values can/should be replaced by DisplayLayout. | 110 // TODO(kylechar): These values can/should be replaced by DisplayLayout. |
| 106 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; | 111 int64_t primary_display_id_ = display::Display::kInvalidDisplayID; |
| 107 std::vector<DisplayInfo> cached_displays_; | 112 std::vector<DisplayInfo> cached_displays_; |
| 108 gfx::Point next_display_origin_; | 113 gfx::Point next_display_origin_; |
| 109 | 114 |
| 110 mojo::BindingSet<mojom::DisplayController> bindings_; | 115 mojo::BindingSet<mojom::DisplayController> bindings_; |
| 111 | 116 |
| 112 DISALLOW_COPY_AND_ASSIGN(PlatformScreenOzone); | 117 DISALLOW_COPY_AND_ASSIGN(PlatformScreenOzone); |
| 113 }; | 118 }; |
| 114 | 119 |
| 115 } // namespace display | 120 } // namespace display |
| 116 | 121 |
| 117 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ | 122 #endif // SERVICES_UI_DISPLAY_PLATFORM_SCREEN_OZONE_H_ |
| OLD | NEW |