| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.h" | 5 #include "ui/ozone/platform/drm/host/drm_display_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 sender_->AddGpuThreadObserver(this); | 23 sender_->AddGpuThreadObserver(this); |
| 24 } | 24 } |
| 25 | 25 |
| 26 DrmDisplayHost::~DrmDisplayHost() { | 26 DrmDisplayHost::~DrmDisplayHost() { |
| 27 sender_->RemoveGpuThreadObserver(this); | 27 sender_->RemoveGpuThreadObserver(this); |
| 28 ClearCallbacks(); | 28 ClearCallbacks(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 void DrmDisplayHost::UpdateDisplaySnapshot( | 31 void DrmDisplayHost::UpdateDisplaySnapshot( |
| 32 const DisplaySnapshot_Params& params) { | 32 const DisplaySnapshot_Params& params) { |
| 33 snapshot_ = base::WrapUnique(new DisplaySnapshotProxy(params)); | 33 snapshot_ = base::MakeUnique<DisplaySnapshotProxy>(params); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void DrmDisplayHost::Configure(const DisplayMode* mode, | 36 void DrmDisplayHost::Configure(const DisplayMode* mode, |
| 37 const gfx::Point& origin, | 37 const gfx::Point& origin, |
| 38 const ConfigureCallback& callback) { | 38 const ConfigureCallback& callback) { |
| 39 if (is_dummy_) { | 39 if (is_dummy_) { |
| 40 callback.Run(true); | 40 callback.Run(true); |
| 41 return; | 41 return; |
| 42 } | 42 } |
| 43 | 43 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void DrmDisplayHost::ClearCallbacks() { | 124 void DrmDisplayHost::ClearCallbacks() { |
| 125 if (!configure_callback_.is_null()) | 125 if (!configure_callback_.is_null()) |
| 126 OnDisplayConfigured(false); | 126 OnDisplayConfigured(false); |
| 127 if (!get_hdcp_callback_.is_null()) | 127 if (!get_hdcp_callback_.is_null()) |
| 128 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED); | 128 OnHDCPStateReceived(false, HDCP_STATE_UNDESIRED); |
| 129 if (!set_hdcp_callback_.is_null()) | 129 if (!set_hdcp_callback_.is_null()) |
| 130 OnHDCPStateUpdated(false); | 130 OnHDCPStateUpdated(false); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace ui | 133 } // namespace ui |
| OLD | NEW |