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

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

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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
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/remoting_cdm_factory.h" 5 #include "media/remoting/remoting_cdm_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "media/base/cdm_config.h" 9 #include "media/base/cdm_config.h"
10 #include "media/remoting/remoting_cdm.h" 10 #include "media/remoting/remoting_cdm.h"
(...skipping 12 matching lines...) Expand all
23 DCHECK(remoter_factory_); 23 DCHECK(remoter_factory_);
24 DCHECK(sink_observer_); 24 DCHECK(sink_observer_);
25 } 25 }
26 26
27 RemotingCdmFactory::~RemotingCdmFactory() {} 27 RemotingCdmFactory::~RemotingCdmFactory() {}
28 28
29 std::unique_ptr<RemotingCdmController> 29 std::unique_ptr<RemotingCdmController>
30 RemotingCdmFactory::CreateRemotingCdmController() { 30 RemotingCdmFactory::CreateRemotingCdmController() {
31 mojom::RemotingSourcePtr remoting_source; 31 mojom::RemotingSourcePtr remoting_source;
32 mojom::RemotingSourceRequest remoting_source_request = 32 mojom::RemotingSourceRequest remoting_source_request =
33 mojo::GetProxy(&remoting_source); 33 mojo::MakeRequest(&remoting_source);
34 mojom::RemoterPtr remoter; 34 mojom::RemoterPtr remoter;
35 remoter_factory_->Create(std::move(remoting_source), 35 remoter_factory_->Create(std::move(remoting_source),
36 mojo::GetProxy(&remoter)); 36 mojo::MakeRequest(&remoter));
37 scoped_refptr<RemotingSourceImpl> remoting_source_impl = 37 scoped_refptr<RemotingSourceImpl> remoting_source_impl =
38 new RemotingSourceImpl(std::move(remoting_source_request), 38 new RemotingSourceImpl(std::move(remoting_source_request),
39 std::move(remoter)); 39 std::move(remoter));
40 // HACK: Copy-over the sink availability status from |sink_observer_| before 40 // HACK: Copy-over the sink availability status from |sink_observer_| before
41 // the RemotingCdmController would naturally get the notification. This is to 41 // the RemotingCdmController would naturally get the notification. This is to
42 // avoid the possible delay on OnSinkAvailable() call from browser. 42 // avoid the possible delay on OnSinkAvailable() call from browser.
43 if (sink_observer_->is_remote_decryption_available()) 43 if (sink_observer_->is_remote_decryption_available())
44 remoting_source_impl->OnSinkAvailable(sink_observer_->sink_capabilities()); 44 remoting_source_impl->OnSinkAvailable(sink_observer_->sink_capabilities());
45 return base::MakeUnique<RemotingCdmController>(remoting_source_impl); 45 return base::MakeUnique<RemotingCdmController>(remoting_source_impl);
46 } 46 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } else { 94 } else {
95 VLOG(1) << "Create default CDM."; 95 VLOG(1) << "Create default CDM.";
96 default_cdm_factory_->Create(key_system, security_origin, cdm_config, 96 default_cdm_factory_->Create(key_system, security_origin, cdm_config,
97 session_message_cb, session_closed_cb, 97 session_message_cb, session_closed_cb,
98 session_keys_change_cb, 98 session_keys_change_cb,
99 session_expiration_update_cb, cdm_created_cb); 99 session_expiration_update_cb, cdm_created_cb);
100 } 100 }
101 } 101 }
102 102
103 } // namespace media 103 } // namespace media
OLDNEW
« no previous file with comments | « media/remoting/remote_demuxer_stream_adapter_unittest.cc ('k') | media/remoting/remoting_source_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698