| 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_SCREEN_MANAGER_OZONE_INTERNAL_H_ | 5 #ifndef SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ |
| 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ | 6 #define SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "mojo/public/cpp/bindings/binding_set.h" | 13 #include "mojo/public/cpp/bindings/binding_set.h" |
| 14 #include "services/service_manager/public/cpp/connection.h" | 14 #include "services/service_manager/public/cpp/connection.h" |
| 15 #include "services/service_manager/public/cpp/interface_factory.h" | 15 #include "services/service_manager/public/cpp/interface_factory.h" |
| 16 #include "services/ui/display/screen_manager.h" | 16 #include "services/ui/display/screen_manager.h" |
| 17 #include "services/ui/display/viewport_metrics.h" | 17 #include "services/ui/display/viewport_metrics.h" |
| 18 #include "services/ui/public/interfaces/display/display_controller.mojom.h" | 18 #include "services/ui/public/interfaces/display/display_controller.mojom.h" |
| 19 #include "services/ui/public/interfaces/display/output_protection.mojom.h" |
| 19 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h" | 20 #include "services/ui/public/interfaces/display/test_display_controller.mojom.h" |
| 20 #include "ui/display/display.h" | 21 #include "ui/display/display.h" |
| 21 #include "ui/display/display_observer.h" | 22 #include "ui/display/display_observer.h" |
| 22 #include "ui/display/manager/chromeos/display_configurator.h" | 23 #include "ui/display/manager/chromeos/display_configurator.h" |
| 23 #include "ui/display/manager/display_manager.h" | 24 #include "ui/display/manager/display_manager.h" |
| 24 #include "ui/display/types/display_constants.h" | 25 #include "ui/display/types/display_constants.h" |
| 25 | 26 |
| 26 namespace display { | 27 namespace display { |
| 27 | 28 |
| 28 class DisplayChangeObserver; | 29 class DisplayChangeObserver; |
| 29 class FakeDisplayController; | 30 class FakeDisplayController; |
| 30 class ScreenBase; | 31 class ScreenBase; |
| 31 class TouchTransformController; | 32 class TouchTransformController; |
| 32 | 33 |
| 33 // ScreenManagerOzoneInternal provides the necessary functionality to configure | 34 // ScreenManagerOzoneInternal provides the necessary functionality to configure |
| 34 // all attached physical displays on the the ozone platform when operating in | 35 // all attached physical displays on the the ozone platform when operating in |
| 35 // internal window mode. | 36 // internal window mode. |
| 36 class ScreenManagerOzoneInternal | 37 class ScreenManagerOzoneInternal |
| 37 : public ScreenManager, | 38 : public ScreenManager, |
| 38 public mojom::TestDisplayController, | 39 public mojom::TestDisplayController, |
| 39 public mojom::DisplayController, | 40 public mojom::DisplayController, |
| 40 public DisplayObserver, | 41 public DisplayObserver, |
| 41 public DisplayManager::Delegate, | 42 public DisplayManager::Delegate, |
| 42 public service_manager::InterfaceFactory<mojom::DisplayController>, | 43 public service_manager::InterfaceFactory<mojom::DisplayController>, |
| 44 public service_manager::InterfaceFactory<mojom::OutputProtection>, |
| 43 public service_manager::InterfaceFactory<mojom::TestDisplayController> { | 45 public service_manager::InterfaceFactory<mojom::TestDisplayController> { |
| 44 public: | 46 public: |
| 45 ScreenManagerOzoneInternal(); | 47 ScreenManagerOzoneInternal(); |
| 46 ~ScreenManagerOzoneInternal() override; | 48 ~ScreenManagerOzoneInternal() override; |
| 47 | 49 |
| 48 void SetPrimaryDisplayId(int64_t display_id); | 50 void SetPrimaryDisplayId(int64_t display_id); |
| 49 | 51 |
| 50 // ScreenManager: | 52 // ScreenManager: |
| 51 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; | 53 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; |
| 52 void Init(ScreenManagerDelegate* delegate) override; | 54 void Init(ScreenManagerDelegate* delegate) override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 const DisplayInfoList& display_info_list) override; | 89 const DisplayInfoList& display_info_list) override; |
| 88 void CloseMirroringDisplayIfNotNecessary() override; | 90 void CloseMirroringDisplayIfNotNecessary() override; |
| 89 void PreDisplayConfigurationChange(bool clear_focus) override; | 91 void PreDisplayConfigurationChange(bool clear_focus) override; |
| 90 void PostDisplayConfigurationChange(bool must_clear_window) override; | 92 void PostDisplayConfigurationChange(bool must_clear_window) override; |
| 91 DisplayConfigurator* display_configurator() override; | 93 DisplayConfigurator* display_configurator() override; |
| 92 | 94 |
| 93 // mojo::InterfaceFactory<mojom::DisplayController>: | 95 // mojo::InterfaceFactory<mojom::DisplayController>: |
| 94 void Create(const service_manager::Identity& remote_identity, | 96 void Create(const service_manager::Identity& remote_identity, |
| 95 mojom::DisplayControllerRequest request) override; | 97 mojom::DisplayControllerRequest request) override; |
| 96 | 98 |
| 99 // mojo::InterfaceFactory<mojom:OutputProtection>: |
| 100 void Create(const service_manager::Identity& remote_identity, |
| 101 mojom::OutputProtectionRequest request) override; |
| 102 |
| 97 // mojo::InterfaceFactory<mojom::TestDisplayController>: | 103 // mojo::InterfaceFactory<mojom::TestDisplayController>: |
| 98 void Create(const service_manager::Identity& remote_identity, | 104 void Create(const service_manager::Identity& remote_identity, |
| 99 mojom::TestDisplayControllerRequest request) override; | 105 mojom::TestDisplayControllerRequest request) override; |
| 100 | 106 |
| 101 DisplayConfigurator display_configurator_; | 107 DisplayConfigurator display_configurator_; |
| 102 std::unique_ptr<DisplayManager> display_manager_; | 108 std::unique_ptr<DisplayManager> display_manager_; |
| 103 std::unique_ptr<DisplayChangeObserver> display_change_observer_; | 109 std::unique_ptr<DisplayChangeObserver> display_change_observer_; |
| 104 std::unique_ptr<TouchTransformController> touch_transform_controller_; | 110 std::unique_ptr<TouchTransformController> touch_transform_controller_; |
| 105 | 111 |
| 106 ScreenBase* screen_ = nullptr; | 112 ScreenBase* screen_ = nullptr; |
| 107 ScreenManagerDelegate* delegate_ = nullptr; | 113 ScreenManagerDelegate* delegate_ = nullptr; |
| 108 | 114 |
| 109 std::unique_ptr<NativeDisplayDelegate> native_display_delegate_; | 115 std::unique_ptr<NativeDisplayDelegate> native_display_delegate_; |
| 110 | 116 |
| 111 // If not null it provides a way to modify the display state when running off | 117 // If not null it provides a way to modify the display state when running off |
| 112 // device (eg. running mustash on Linux). | 118 // device (eg. running mustash on Linux). |
| 113 FakeDisplayController* fake_display_controller_ = nullptr; | 119 FakeDisplayController* fake_display_controller_ = nullptr; |
| 114 | 120 |
| 115 int64_t primary_display_id_ = kInvalidDisplayId; | 121 int64_t primary_display_id_ = kInvalidDisplayId; |
| 116 | 122 |
| 117 mojo::BindingSet<mojom::DisplayController> controller_bindings_; | 123 mojo::BindingSet<mojom::DisplayController> controller_bindings_; |
| 118 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; | 124 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; |
| 119 | 125 |
| 120 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzoneInternal); | 126 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzoneInternal); |
| 121 }; | 127 }; |
| 122 | 128 |
| 123 } // namespace display | 129 } // namespace display |
| 124 | 130 |
| 125 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ | 131 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ |
| OLD | NEW |