diff options
author | sergeyu <sergeyu@chromium.org> | 2016-02-08 16:24:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-09 00:26:15 +0000 |
commit | 0172f017c32ff2c7deef3870a9dbd0e9f685f55d (patch) | |
tree | dd56014bd0550c5a1c31d5864915c78d1c70f248 /remoting/client/plugin | |
parent | 0c71b601f3df5c09a01d66838c3fa40e3a381750 (diff) | |
download | chromium_src-0172f017c32ff2c7deef3870a9dbd0e9f685f55d.zip chromium_src-0172f017c32ff2c7deef3870a9dbd0e9f685f55d.tar.gz chromium_src-0172f017c32ff2c7deef3870a9dbd0e9f685f55d.tar.bz2 |
Fix ChromotingInstance to use ChromotingConnection only after Start().
Previously ChromotingInstance::HandleConnect() was calling
client_->input_stub() before Start(). input_stub() should not be called
before Start() because it may not be initialized at that point.
BUG=582518
Review URL: https://codereview.chromium.org/1674223003
Cr-Commit-Position: refs/heads/master@{#374233}
Diffstat (limited to 'remoting/client/plugin')
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index e791ce0..11b029e 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -680,15 +680,6 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) { new ChromotingClient(&context_, this, video_renderer_.get(), make_scoped_ptr(new PepperAudioPlayer(this)))); - // Connect the input pipeline to the protocol stub & initialize components. - mouse_input_filter_.set_input_stub(client_->input_stub()); - if (!plugin_view_.is_null()) { - webrtc::DesktopSize size(plugin_view_.GetRect().width(), - plugin_view_.GetRect().height()); - mouse_input_filter_.set_input_size(size); - touch_input_scaler_.set_input_size(size); - } - // Setup the signal strategy. signal_strategy_.reset(new DelegatingSignalStrategy( local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, @@ -735,6 +726,15 @@ void ChromotingInstance::HandleConnect(const base::DictionaryValue& data) { client_->Start(signal_strategy_.get(), std::move(authenticator), transport_context, host_jid, capabilities); + // Connect the input pipeline to the protocol stub. + mouse_input_filter_.set_input_stub(client_->input_stub()); + if (!plugin_view_.is_null()) { + webrtc::DesktopSize size(plugin_view_.GetRect().width(), + plugin_view_.GetRect().height()); + mouse_input_filter_.set_input_size(size); + touch_input_scaler_.set_input_size(size); + } + // Start timer that periodically sends perf stats. stats_update_timer_.Start( FROM_HERE, base::TimeDelta::FromSeconds(kUIStatsUpdatePeriodSeconds), |