Chromium Code Reviews| 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; |