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

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

Issue 2592623002: mojo:: Introduce InterfaceRequest ctor that takes in InterfacePtr* (Closed)
Patch Set: Minor fix 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 11 matching lines...) Expand all
22 DCHECK(default_cdm_factory_); 22 DCHECK(default_cdm_factory_);
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(&remoting_source);
33 mojo::MakeRequest(&remoting_source);
34 mojom::RemoterPtr remoter; 33 mojom::RemoterPtr remoter;
35 remoter_factory_->Create(std::move(remoting_source), 34 remoter_factory_->Create(std::move(remoting_source),
36 mojo::MakeRequest(&remoter)); 35 mojo::MakeRequest(&remoter));
37 scoped_refptr<RemotingSourceImpl> remoting_source_impl = 36 scoped_refptr<RemotingSourceImpl> remoting_source_impl =
38 new RemotingSourceImpl(std::move(remoting_source_request), 37 new RemotingSourceImpl(std::move(remoting_source_request),
39 std::move(remoter)); 38 std::move(remoter));
40 // HACK: Copy-over the sink availability status from |sink_observer_| before 39 // HACK: Copy-over the sink availability status from |sink_observer_| before
41 // the RemotingCdmController would naturally get the notification. This is to 40 // the RemotingCdmController would naturally get the notification. This is to
42 // avoid the possible delay on OnSinkAvailable() call from browser. 41 // avoid the possible delay on OnSinkAvailable() call from browser.
43 if (sink_observer_->is_remote_decryption_available()) 42 if (sink_observer_->is_remote_decryption_available())
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } else { 93 } else {
95 VLOG(1) << "Create default CDM."; 94 VLOG(1) << "Create default CDM.";
96 default_cdm_factory_->Create(key_system, security_origin, cdm_config, 95 default_cdm_factory_->Create(key_system, security_origin, cdm_config,
97 session_message_cb, session_closed_cb, 96 session_message_cb, session_closed_cb,
98 session_keys_change_cb, 97 session_keys_change_cb,
99 session_expiration_update_cb, cdm_created_cb); 98 session_expiration_update_cb, cdm_created_cb);
100 } 99 }
101 } 100 }
102 101
103 } // namespace media 102 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698