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

Unified Diff: remoting/client/plugin/chromoting_instance.cc

Issue 2052723002: Adding an interface to allow extention of the audio player for CRD and iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor updates based on CL feedback. Thanks! Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 90db58344b3f2324574d56baa893dca5d9181a33..b4b631be2cb8988147b13e4443e57e4eb0b25b64 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -658,9 +658,15 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) {
if (!plugin_view_.is_null())
video_renderer_->OnViewChanged(plugin_view_);
+ if (!audio_player_) {
+ audio_player_.reset(new PepperAudioPlayer(this));
+ }
+
client_.reset(
- new ChromotingClient(&context_, this, video_renderer_.get(),
- base::WrapUnique(new PepperAudioPlayer(this))));
+ new ChromotingClient(&context_,
+ this,
Sergey Ulanov 2016/06/09 20:23:45 this fits on the previous line. git-cl-format plea
+ video_renderer_.get(),
+ audio_player_.get());
// Setup the signal strategy.
signal_strategy_.reset(new DelegatingSignalStrategy(
@@ -973,6 +979,7 @@ void ChromotingInstance::Disconnect() {
mouse_input_filter_.set_input_stub(nullptr);
client_.reset();
video_renderer_.reset();
+ audio_player_.reset();
stats_update_timer_.Stop();
}
@@ -1058,7 +1065,7 @@ bool ChromotingInstance::LogToUI(int severity, const char* file, int line,
size_t message_start,
const std::string& str) {
PP_LogLevel log_level = PP_LOGLEVEL_ERROR;
- switch(severity) {
+ switch (severity) {
case logging::LOG_INFO:
log_level = PP_LOGLEVEL_TIP;
break;

Powered by Google App Engine
This is Rietveld 408576698