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 #include "services/ui/display/platform_screen_ozone.h" | 5 #include "services/ui/display/platform_screen_ozone.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 PlatformScreenOzone::PlatformScreenOzone() {} | 57 PlatformScreenOzone::PlatformScreenOzone() {} |
58 | 58 |
59 PlatformScreenOzone::~PlatformScreenOzone() { | 59 PlatformScreenOzone::~PlatformScreenOzone() { |
60 // We are shutting down and don't want to make anymore display changes. | 60 // We are shutting down and don't want to make anymore display changes. |
61 fake_display_controller_ = nullptr; | 61 fake_display_controller_ = nullptr; |
62 display_configurator_.RemoveObserver(this); | 62 display_configurator_.RemoveObserver(this); |
63 } | 63 } |
64 | 64 |
65 void PlatformScreenOzone::AddInterfaces(shell::InterfaceRegistry* registry) { | 65 void PlatformScreenOzone::AddInterfaces( |
| 66 service_manager::InterfaceRegistry* registry) { |
66 registry->AddInterface<mojom::DisplayController>(this); | 67 registry->AddInterface<mojom::DisplayController>(this); |
67 } | 68 } |
68 | 69 |
69 void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) { | 70 void PlatformScreenOzone::Init(PlatformScreenDelegate* delegate) { |
70 DCHECK(delegate); | 71 DCHECK(delegate); |
71 delegate_ = delegate; | 72 delegate_ = delegate; |
72 | 73 |
73 std::unique_ptr<ui::NativeDisplayDelegate> native_display_delegate = | 74 std::unique_ptr<ui::NativeDisplayDelegate> native_display_delegate = |
74 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); | 75 ui::OzonePlatform::GetInstance()->CreateNativeDisplayDelegate(); |
75 | 76 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 wait_for_display_config_update_ = false; | 256 wait_for_display_config_update_ = false; |
256 } | 257 } |
257 | 258 |
258 void PlatformScreenOzone::OnDisplayModeChangeFailed( | 259 void PlatformScreenOzone::OnDisplayModeChangeFailed( |
259 const ui::DisplayConfigurator::DisplayStateList& displays, | 260 const ui::DisplayConfigurator::DisplayStateList& displays, |
260 ui::MultipleDisplayState failed_new_state) { | 261 ui::MultipleDisplayState failed_new_state) { |
261 LOG(ERROR) << "OnDisplayModeChangeFailed from DisplayConfigurator"; | 262 LOG(ERROR) << "OnDisplayModeChangeFailed from DisplayConfigurator"; |
262 wait_for_display_config_update_ = false; | 263 wait_for_display_config_update_ = false; |
263 } | 264 } |
264 | 265 |
265 void PlatformScreenOzone::Create(const shell::Identity& remote_identity, | 266 void PlatformScreenOzone::Create( |
266 mojom::DisplayControllerRequest request) { | 267 const service_manager::Identity& remote_identity, |
| 268 mojom::DisplayControllerRequest request) { |
267 bindings_.AddBinding(this, std::move(request)); | 269 bindings_.AddBinding(this, std::move(request)); |
268 } | 270 } |
269 | 271 |
270 } // namespace display | 272 } // namespace display |
OLD | NEW |