Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_thread_proxy.cc

Issue 2259753003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/drm_window.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_proxy.h" 5 #include "ui/ozone/platform/drm/gpu/drm_thread_proxy.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h" 9 #include "ui/ozone/platform/drm/gpu/drm_thread_message_proxy.h"
10 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h" 10 #include "ui/ozone/platform/drm/gpu/drm_window_proxy.h"
11 #include "ui/ozone/platform/drm/gpu/gbm_buffer.h" 11 #include "ui/ozone/platform/drm/gpu/gbm_buffer.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 DrmThreadProxy::DrmThreadProxy() {} 16 DrmThreadProxy::DrmThreadProxy() {}
17 17
18 DrmThreadProxy::~DrmThreadProxy() {} 18 DrmThreadProxy::~DrmThreadProxy() {}
19 19
20 void DrmThreadProxy::BindThreadIntoMessagingProxy( 20 void DrmThreadProxy::BindThreadIntoMessagingProxy(
21 InterThreadMessagingProxy* messaging_proxy) { 21 InterThreadMessagingProxy* messaging_proxy) {
22 messaging_proxy->SetDrmThread(&drm_thread_); 22 messaging_proxy->SetDrmThread(&drm_thread_);
23 } 23 }
24 24
25 std::unique_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy( 25 std::unique_ptr<DrmWindowProxy> DrmThreadProxy::CreateDrmWindowProxy(
26 gfx::AcceleratedWidget widget) { 26 gfx::AcceleratedWidget widget) {
27 return base::WrapUnique(new DrmWindowProxy(widget, &drm_thread_)); 27 return base::MakeUnique<DrmWindowProxy>(widget, &drm_thread_);
28 } 28 }
29 29
30 scoped_refptr<GbmBuffer> DrmThreadProxy::CreateBuffer( 30 scoped_refptr<GbmBuffer> DrmThreadProxy::CreateBuffer(
31 gfx::AcceleratedWidget widget, 31 gfx::AcceleratedWidget widget,
32 const gfx::Size& size, 32 const gfx::Size& size,
33 gfx::BufferFormat format, 33 gfx::BufferFormat format,
34 gfx::BufferUsage usage) { 34 gfx::BufferUsage usage) {
35 scoped_refptr<GbmBuffer> buffer; 35 scoped_refptr<GbmBuffer> buffer;
36 PostSyncTask( 36 PostSyncTask(
37 drm_thread_.task_runner(), 37 drm_thread_.task_runner(),
(...skipping 26 matching lines...) Expand all
64 } 64 }
65 65
66 void DrmThreadProxy::AddBinding(ozone::mojom::DeviceCursorRequest request) { 66 void DrmThreadProxy::AddBinding(ozone::mojom::DeviceCursorRequest request) {
67 drm_thread_.task_runner()->PostTask( 67 drm_thread_.task_runner()->PostTask(
68 FROM_HERE, 68 FROM_HERE,
69 base::Bind(&DrmThread::AddBinding, base::Unretained(&drm_thread_), 69 base::Bind(&DrmThread::AddBinding, base::Unretained(&drm_thread_),
70 base::Passed(&request))); 70 base::Passed(&request)));
71 } 71 }
72 72
73 } // namespace ui 73 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_thread.cc ('k') | ui/ozone/platform/drm/gpu/drm_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698