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

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: Addressing comments in CL. 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
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_audio_player.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9a961d928e9dc2c2ed69f65797ae07430f4dc8d6 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -658,9 +658,12 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) {
if (!plugin_view_.is_null())
video_renderer_->OnViewChanged(plugin_view_);
- client_.reset(
- new ChromotingClient(&context_, this, video_renderer_.get(),
- base::WrapUnique(new PepperAudioPlayer(this))));
+ if (!audio_player_) {
+ audio_player_.reset(new PepperAudioPlayer(this));
+ }
+
+ client_.reset(new ChromotingClient(&context_, this, video_renderer_.get(),
+ audio_player_->GetWeakPtr()));
// Setup the signal strategy.
signal_strategy_.reset(new DelegatingSignalStrategy(
@@ -973,6 +976,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 +1062,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;
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_audio_player.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698