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/gpu/drm_gpu_platform_support.h" | 5 #include "ui/ozone/platform/drm/gpu/drm_gpu_platform_support.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/thread_task_runner_handle.h" | 8 #include "base/thread_task_runner_handle.h" |
9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | 10 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 filter_ = new DrmGpuPlatformSupportMessageFilter( | 175 filter_ = new DrmGpuPlatformSupportMessageFilter( |
176 screen_manager, base::Bind(&DrmGpuPlatformSupport::SetIOTaskRunner, | 176 screen_manager, base::Bind(&DrmGpuPlatformSupport::SetIOTaskRunner, |
177 base::Unretained(this)), | 177 base::Unretained(this)), |
178 this); | 178 this); |
179 } | 179 } |
180 | 180 |
181 DrmGpuPlatformSupport::~DrmGpuPlatformSupport() { | 181 DrmGpuPlatformSupport::~DrmGpuPlatformSupport() { |
182 } | 182 } |
183 | 183 |
184 void DrmGpuPlatformSupport::AddHandler(scoped_ptr<GpuPlatformSupport> handler) { | 184 void DrmGpuPlatformSupport::AddHandler(scoped_ptr<GpuPlatformSupport> handler) { |
185 handlers_.push_back(handler.release()); | 185 handlers_.push_back(handler.Pass()); |
186 } | 186 } |
187 | 187 |
188 void DrmGpuPlatformSupport::OnChannelEstablished(IPC::Sender* sender) { | 188 void DrmGpuPlatformSupport::OnChannelEstablished(IPC::Sender* sender) { |
189 sender_ = sender; | 189 sender_ = sender; |
190 | 190 |
191 for (size_t i = 0; i < handlers_.size(); ++i) | 191 for (size_t i = 0; i < handlers_.size(); ++i) |
192 handlers_[i]->OnChannelEstablished(sender); | 192 handlers_[i]->OnChannelEstablished(sender); |
193 } | 193 } |
194 | 194 |
195 bool DrmGpuPlatformSupport::OnMessageReceived(const IPC::Message& message) { | 195 bool DrmGpuPlatformSupport::OnMessageReceived(const IPC::Message& message) { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 void DrmGpuPlatformSupport::SetIOTaskRunner( | 322 void DrmGpuPlatformSupport::SetIOTaskRunner( |
323 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { | 323 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner) { |
324 drm_device_manager_->InitializeIOTaskRunner(io_task_runner); | 324 drm_device_manager_->InitializeIOTaskRunner(io_task_runner); |
325 } | 325 } |
326 | 326 |
327 IPC::MessageFilter* DrmGpuPlatformSupport::GetMessageFilter() { | 327 IPC::MessageFilter* DrmGpuPlatformSupport::GetMessageFilter() { |
328 return filter_.get(); | 328 return filter_.get(); |
329 } | 329 } |
330 | 330 |
331 } // namespace ui | 331 } // namespace ui |
OLD | NEW |