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

Side by Side Diff: media/cast/sender/fake_video_encode_accelerator_factory.cc

Issue 1544313002: Convert Pass()→std::move() in //media (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « media/cast/sender/external_video_encoder.cc ('k') | media/cast/sender/frame_sender.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 "media/cast/sender/fake_video_encode_accelerator_factory.h" 5 #include "media/cast/sender/fake_video_encode_accelerator_factory.h"
6 6
7 #include <utility>
8
7 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
8 10
9 namespace media { 11 namespace media {
10 namespace cast { 12 namespace cast {
11 13
12 FakeVideoEncodeAcceleratorFactory::FakeVideoEncodeAcceleratorFactory( 14 FakeVideoEncodeAcceleratorFactory::FakeVideoEncodeAcceleratorFactory(
13 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner) 15 const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
14 : task_runner_(task_runner), 16 : task_runner_(task_runner),
15 will_init_succeed_(true), 17 will_init_succeed_(true),
16 auto_respond_(false), 18 auto_respond_(false),
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 CHECK(next_response_shm_->CreateAndMapAnonymous(size)); 61 CHECK(next_response_shm_->CreateAndMapAnonymous(size));
60 shm_response_callback_ = callback; 62 shm_response_callback_ = callback;
61 if (auto_respond_) 63 if (auto_respond_)
62 RespondWithSharedMemory(); 64 RespondWithSharedMemory();
63 } 65 }
64 66
65 void FakeVideoEncodeAcceleratorFactory::RespondWithVideoEncodeAccelerator() { 67 void FakeVideoEncodeAcceleratorFactory::RespondWithVideoEncodeAccelerator() {
66 DCHECK(next_response_vea_.get()); 68 DCHECK(next_response_vea_.get());
67 last_response_vea_ = next_response_vea_.get(); 69 last_response_vea_ = next_response_vea_.get();
68 ++vea_response_count_; 70 ++vea_response_count_;
69 base::ResetAndReturn(&vea_response_callback_).Run( 71 base::ResetAndReturn(&vea_response_callback_)
70 task_runner_, next_response_vea_.Pass()); 72 .Run(task_runner_, std::move(next_response_vea_));
71 } 73 }
72 74
73 void FakeVideoEncodeAcceleratorFactory::RespondWithSharedMemory() { 75 void FakeVideoEncodeAcceleratorFactory::RespondWithSharedMemory() {
74 DCHECK(next_response_shm_.get()); 76 DCHECK(next_response_shm_.get());
75 last_response_shm_ = next_response_shm_.get(); 77 last_response_shm_ = next_response_shm_.get();
76 ++shm_response_count_; 78 ++shm_response_count_;
77 base::ResetAndReturn(&shm_response_callback_).Run(next_response_shm_.Pass()); 79 base::ResetAndReturn(&shm_response_callback_)
80 .Run(std::move(next_response_shm_));
78 } 81 }
79 82
80 } // namespace cast 83 } // namespace cast
81 } // namespace media 84 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/external_video_encoder.cc ('k') | media/cast/sender/frame_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698