| 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> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 public: | 46 public: |
| 47 ScreenManagerOzoneInternal(); | 47 ScreenManagerOzoneInternal(); |
| 48 ~ScreenManagerOzoneInternal() override; | 48 ~ScreenManagerOzoneInternal() override; |
| 49 | 49 |
| 50 void SetPrimaryDisplayId(int64_t display_id); | 50 void SetPrimaryDisplayId(int64_t display_id); |
| 51 | 51 |
| 52 // ScreenManager: | 52 // ScreenManager: |
| 53 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; | 53 void AddInterfaces(service_manager::InterfaceRegistry* registry) override; |
| 54 void Init(ScreenManagerDelegate* delegate) override; | 54 void Init(ScreenManagerDelegate* delegate) override; |
| 55 void RequestCloseDisplay(int64_t display_id) override; | 55 void RequestCloseDisplay(int64_t display_id) override; |
| 56 int64_t GetPrimaryDisplayId() const override; | |
| 57 | 56 |
| 58 // mojom::TestDisplayController: | 57 // mojom::TestDisplayController: |
| 59 void ToggleAddRemoveDisplay() override; | 58 void ToggleAddRemoveDisplay() override; |
| 60 void ToggleDisplayResolution() override; | 59 void ToggleDisplayResolution() override; |
| 61 | 60 |
| 62 // mojom::DisplayController: | 61 // mojom::DisplayController: |
| 63 void IncreaseInternalDisplayZoom() override; | 62 void IncreaseInternalDisplayZoom() override; |
| 64 void DecreaseInternalDisplayZoom() override; | 63 void DecreaseInternalDisplayZoom() override; |
| 65 void ResetInternalDisplayZoom() override; | 64 void ResetInternalDisplayZoom() override; |
| 66 void RotateCurrentDisplayCW() override; | 65 void RotateCurrentDisplayCW() override; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 101 |
| 103 // mojo::InterfaceFactory<mojom::TestDisplayController>: | 102 // mojo::InterfaceFactory<mojom::TestDisplayController>: |
| 104 void Create(const service_manager::Identity& remote_identity, | 103 void Create(const service_manager::Identity& remote_identity, |
| 105 mojom::TestDisplayControllerRequest request) override; | 104 mojom::TestDisplayControllerRequest request) override; |
| 106 | 105 |
| 107 DisplayConfigurator display_configurator_; | 106 DisplayConfigurator display_configurator_; |
| 108 std::unique_ptr<DisplayManager> display_manager_; | 107 std::unique_ptr<DisplayManager> display_manager_; |
| 109 std::unique_ptr<DisplayChangeObserver> display_change_observer_; | 108 std::unique_ptr<DisplayChangeObserver> display_change_observer_; |
| 110 std::unique_ptr<TouchTransformController> touch_transform_controller_; | 109 std::unique_ptr<TouchTransformController> touch_transform_controller_; |
| 111 | 110 |
| 112 ScreenBase* screen_ = nullptr; | 111 // A Screen instance is created in the constructor because it might be |
| 112 // accessed early. The ownership of this object will be transfered to |
| 113 // |display_manager_| when that gets initialized. |
| 114 std::unique_ptr<ScreenBase> screen_owned_; |
| 115 |
| 116 // Used to add/remove/modify displays. |
| 117 ScreenBase* screen_; |
| 118 |
| 113 ScreenManagerDelegate* delegate_ = nullptr; | 119 ScreenManagerDelegate* delegate_ = nullptr; |
| 114 | 120 |
| 115 std::unique_ptr<NativeDisplayDelegate> native_display_delegate_; | 121 std::unique_ptr<NativeDisplayDelegate> native_display_delegate_; |
| 116 | 122 |
| 117 // If not null it provides a way to modify the display state when running off | 123 // If not null it provides a way to modify the display state when running off |
| 118 // device (eg. running mustash on Linux). | 124 // device (eg. running mustash on Linux). |
| 119 FakeDisplayController* fake_display_controller_ = nullptr; | 125 FakeDisplayController* fake_display_controller_ = nullptr; |
| 120 | 126 |
| 121 int64_t primary_display_id_ = kInvalidDisplayId; | 127 int64_t primary_display_id_ = kInvalidDisplayId; |
| 122 | 128 |
| 123 mojo::BindingSet<mojom::DisplayController> controller_bindings_; | 129 mojo::BindingSet<mojom::DisplayController> controller_bindings_; |
| 124 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; | 130 mojo::BindingSet<mojom::TestDisplayController> test_bindings_; |
| 125 | 131 |
| 126 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzoneInternal); | 132 DISALLOW_COPY_AND_ASSIGN(ScreenManagerOzoneInternal); |
| 127 }; | 133 }; |
| 128 | 134 |
| 129 } // namespace display | 135 } // namespace display |
| 130 | 136 |
| 131 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ | 137 #endif // SERVICES_UI_DISPLAY_SCREEN_MANAGER_OZONE_INTERNAL_H_ |
| OLD | NEW |