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

Side by Side Diff: media/remoting/fake_remoting_controller.cc

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Rebase + response to review Created 3 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 | « mash/webtest/webtest.cc ('k') | media/remoting/remoting_cdm_factory.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/remoting/fake_remoting_controller.h" 5 #include "media/remoting/fake_remoting_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 void FakeRemoterFactory::Create(mojom::RemotingSourcePtr source, 170 void FakeRemoterFactory::Create(mojom::RemotingSourcePtr source,
171 mojom::RemoterRequest request) { 171 mojom::RemoterRequest request) {
172 mojo::MakeStrongBinding( 172 mojo::MakeStrongBinding(
173 base::MakeUnique<FakeRemoter>(std::move(source), start_will_fail_), 173 base::MakeUnique<FakeRemoter>(std::move(source), start_will_fail_),
174 std::move(request)); 174 std::move(request));
175 } 175 }
176 176
177 scoped_refptr<RemotingSourceImpl> CreateRemotingSourceImpl( 177 scoped_refptr<RemotingSourceImpl> CreateRemotingSourceImpl(
178 bool start_will_fail) { 178 bool start_will_fail) {
179 mojom::RemotingSourcePtr remoting_source; 179 mojom::RemotingSourcePtr remoting_source;
180 mojom::RemotingSourceRequest remoting_source_request = 180 mojom::RemotingSourceRequest remoting_source_request(&remoting_source);
181 mojo::MakeRequest(&remoting_source);
182 mojom::RemoterPtr remoter; 181 mojom::RemoterPtr remoter;
183 std::unique_ptr<mojom::RemoterFactory> remoter_factory = 182 std::unique_ptr<mojom::RemoterFactory> remoter_factory =
184 base::MakeUnique<FakeRemoterFactory>(start_will_fail); 183 base::MakeUnique<FakeRemoterFactory>(start_will_fail);
185 remoter_factory->Create(std::move(remoting_source), 184 remoter_factory->Create(std::move(remoting_source),
186 mojo::MakeRequest(&remoter)); 185 mojo::MakeRequest(&remoter));
187 return new RemotingSourceImpl(std::move(remoting_source_request), 186 return new RemotingSourceImpl(std::move(remoting_source_request),
188 std::move(remoter)); 187 std::move(remoter));
189 } 188 }
190 189
191 } // namespace media 190 } // namespace media
OLDNEW
« no previous file with comments | « mash/webtest/webtest.cc ('k') | media/remoting/remoting_cdm_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698