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/gpu/drm_thread_message_proxy.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" |
6 | 6 |
7 #include "base/threading/thread_task_runner_handle.h" | 7 #include "base/threading/thread_task_runner_handle.h" |
8 #include "ipc/ipc_message.h" | 8 #include "ipc/ipc_message.h" |
9 #include "ipc/ipc_sender.h" | 9 #include "ipc/ipc_sender.h" |
10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" | 10 #include "ui/ozone/common/gpu/ozone_gpu_messages.h" |
11 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" | 11 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h" |
12 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" | 12 #include "ui/ozone/platform/drm/gpu/proxy_helpers.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 DrmThreadMessageProxy::DrmThreadMessageProxy() : weak_ptr_factory_(this) {} | 16 DrmThreadMessageProxy::DrmThreadMessageProxy() : weak_ptr_factory_(this) {} |
17 | 17 |
18 DrmThreadMessageProxy::~DrmThreadMessageProxy() {} | 18 DrmThreadMessageProxy::~DrmThreadMessageProxy() {} |
19 | 19 |
20 void DrmThreadMessageProxy::SetDrmThread(DrmThread* thread) { | 20 void DrmThreadMessageProxy::SetDrmThread(DrmThread* thread) { |
21 drm_thread_ = thread; | 21 drm_thread_ = thread; |
22 } | 22 } |
23 | 23 |
24 void DrmThreadMessageProxy::OnFilterAdded(IPC::Sender* sender) { | 24 void DrmThreadMessageProxy::OnFilterAdded(IPC::Channel* channel) { |
25 sender_ = sender; | 25 sender_ = channel; |
26 | 26 |
27 // The DRM thread needs to be started late since we need to wait for the | 27 // The DRM thread needs to be started late since we need to wait for the |
28 // sandbox to start. | 28 // sandbox to start. |
29 drm_thread_->Start(); | 29 drm_thread_->Start(); |
30 } | 30 } |
31 | 31 |
32 bool DrmThreadMessageProxy::OnMessageReceived(const IPC::Message& message) { | 32 bool DrmThreadMessageProxy::OnMessageReceived(const IPC::Message& message) { |
33 bool handled = true; | 33 bool handled = true; |
34 | 34 |
35 IPC_BEGIN_MESSAGE_MAP(DrmThreadMessageProxy, message) | 35 IPC_BEGIN_MESSAGE_MAP(DrmThreadMessageProxy, message) |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 HDCPState state) const { | 260 HDCPState state) const { |
261 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); | 261 sender_->Send(new OzoneHostMsg_HDCPStateReceived(display_id, success, state)); |
262 } | 262 } |
263 | 263 |
264 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, | 264 void DrmThreadMessageProxy::OnSetHDCPStateCallback(int64_t display_id, |
265 bool success) const { | 265 bool success) const { |
266 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); | 266 sender_->Send(new OzoneHostMsg_HDCPStateUpdated(display_id, success)); |
267 } | 267 } |
268 | 268 |
269 } // namespace ui | 269 } // namespace ui |
OLD | NEW |