| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/ozone/platform/drm/host/drm_display_host_manager.h" | 5 #include "ui/ozone/platform/drm/host/drm_display_host_manager.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <xf86drm.h> | 9 #include <xf86drm.h> |
| 10 | 10 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return; | 213 return; |
| 214 } | 214 } |
| 215 | 215 |
| 216 relinquish_display_control_callback_ = callback; | 216 relinquish_display_control_callback_ = callback; |
| 217 display_control_change_pending_ = true; | 217 display_control_change_pending_ = true; |
| 218 | 218 |
| 219 if (!proxy_->GpuRelinquishDisplayControl()) | 219 if (!proxy_->GpuRelinquishDisplayControl()) |
| 220 GpuRelinquishedDisplayControl(false); | 220 GpuRelinquishedDisplayControl(false); |
| 221 } | 221 } |
| 222 | 222 |
| 223 void DrmDisplayHostManager::GetCachedDisplays( |
| 224 const GetDisplaysCallback& callback) { |
| 225 RunUpdateDisplaysCallback(callback); |
| 226 } |
| 227 |
| 223 void DrmDisplayHostManager::UpdateDisplays( | 228 void DrmDisplayHostManager::UpdateDisplays( |
| 224 const GetDisplaysCallback& callback) { | 229 const GetDisplaysCallback& callback) { |
| 225 get_displays_callback_ = callback; | 230 get_displays_callback_ = callback; |
| 226 if (!proxy_->GpuRefreshNativeDisplays()) { | 231 if (!proxy_->GpuRefreshNativeDisplays()) { |
| 227 get_displays_callback_.Reset(); | 232 get_displays_callback_.Reset(); |
| 228 RunUpdateDisplaysCallback(callback); | 233 RunUpdateDisplaysCallback(callback); |
| 229 } | 234 } |
| 230 } | 235 } |
| 231 | 236 |
| 232 void DrmDisplayHostManager::OnDeviceEvent(const DeviceEvent& event) { | 237 void DrmDisplayHostManager::OnDeviceEvent(const DeviceEvent& event) { |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 | 463 |
| 459 callback.Run(snapshots); | 464 callback.Run(snapshots); |
| 460 } | 465 } |
| 461 | 466 |
| 462 void DrmDisplayHostManager::NotifyDisplayDelegate() const { | 467 void DrmDisplayHostManager::NotifyDisplayDelegate() const { |
| 463 if (delegate_) | 468 if (delegate_) |
| 464 delegate_->OnConfigurationChanged(); | 469 delegate_->OnConfigurationChanged(); |
| 465 } | 470 } |
| 466 | 471 |
| 467 } // namespace ui | 472 } // namespace ui |
| OLD | NEW |