| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/screen_manager_forwarding.h" | 5 #include "services/ui/display/screen_manager_forwarding.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "services/service_manager/public/cpp/binder_registry.h" | 10 #include "services/service_manager/public/cpp/binder_registry.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 mode->refresh_rate() == mode_to_find->refresh_rate()) { | 28 mode->refresh_rate() == mode_to_find->refresh_rate()) { |
| 29 return mode.get(); | 29 return mode.get(); |
| 30 } | 30 } |
| 31 } | 31 } |
| 32 NOTREACHED(); | 32 NOTREACHED(); |
| 33 return nullptr; | 33 return nullptr; |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace | 36 } // namespace |
| 37 | 37 |
| 38 // TODO(sky/kylechar): Change ScreenManager::Create() to make a | |
| 39 // ScreenManagerForwarding in mus mode. | |
| 40 | |
| 41 ScreenManagerForwarding::ScreenManagerForwarding() : binding_(this) {} | 38 ScreenManagerForwarding::ScreenManagerForwarding() : binding_(this) {} |
| 42 | 39 |
| 43 ScreenManagerForwarding::~ScreenManagerForwarding() { | 40 ScreenManagerForwarding::~ScreenManagerForwarding() { |
| 44 if (native_display_delegate_) | 41 if (native_display_delegate_) |
| 45 native_display_delegate_->RemoveObserver(this); | 42 native_display_delegate_->RemoveObserver(this); |
| 46 } | 43 } |
| 47 | 44 |
| 48 void ScreenManagerForwarding::AddInterfaces( | 45 void ScreenManagerForwarding::AddInterfaces( |
| 49 service_manager::BinderRegistry* registry) { | 46 service_manager::BinderRegistry* registry) { |
| 50 registry->AddInterface<mojom::NativeDisplayDelegate>(this); | 47 registry->AddInterface<mojom::NativeDisplayDelegate>(this); |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 if (status) { | 188 if (status) { |
| 192 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone | 189 // Modify display snapshot similar to how ConfigureDisplaysTask would. Ozone |
| 193 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it. | 190 // DRM needs these to be changed and ConfigureDisplaysTasks can't do it. |
| 194 snapshot->set_current_mode(mode); | 191 snapshot->set_current_mode(mode); |
| 195 snapshot->set_origin(origin); | 192 snapshot->set_origin(origin); |
| 196 } | 193 } |
| 197 callback.Run(status); | 194 callback.Run(status); |
| 198 } | 195 } |
| 199 | 196 |
| 200 } // namespace display | 197 } // namespace display |
| OLD | NEW |