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 af4954b0e21e2222466829793dae3e7e439319ee..bdc07521767f97e397d0005f32fe2686b72bc48a 100644 |
| --- a/remoting/client/plugin/chromoting_instance.cc |
| +++ b/remoting/client/plugin/chromoting_instance.cc |
| @@ -341,21 +341,6 @@ void ChromotingInstance::OnVideoFirstFrameReceived() { |
| make_scoped_ptr(new base::DictionaryValue())); |
| } |
| -void ChromotingInstance::OnVideoSize(const webrtc::DesktopSize& size, |
| - const webrtc::DesktopVector& dpi) { |
| - mouse_input_filter_.set_output_size(size); |
| - touch_input_scaler_.set_output_size(size); |
| - |
| - scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); |
| - data->SetInteger("width", size.width()); |
| - data->SetInteger("height", size.height()); |
| - if (dpi.x()) |
| - data->SetInteger("x_dpi", dpi.x()); |
| - if (dpi.y()) |
| - data->SetInteger("y_dpi", dpi.y()); |
| - PostLegacyJsonMessage("onDesktopSize", std::move(data)); |
| -} |
| - |
| void ChromotingInstance::OnVideoFrameDirtyRegion( |
| const webrtc::DesktopRegion& dirty_region) { |
| scoped_ptr<base::ListValue> rects_value(new base::ListValue()); |
| @@ -489,6 +474,21 @@ void ChromotingInstance::DeliverHostMessage( |
| PostLegacyJsonMessage("extensionMessage", std::move(data)); |
| } |
| +void ChromotingInstance::SetDesktopSize(const webrtc::DesktopSize& size, |
| + const webrtc::DesktopVector& dpi) { |
| + mouse_input_filter_.set_output_size(size); |
| + touch_input_scaler_.set_output_size(size); |
| + |
| + scoped_ptr<base::DictionaryValue> data(new base::DictionaryValue()); |
| + data->SetInteger("width", size.width()); |
| + data->SetInteger("height", size.height()); |
| + if (dpi.x()) |
| + data->SetInteger("x_dpi", dpi.x()); |
| + if (dpi.y()) |
| + data->SetInteger("y_dpi", dpi.y()); |
|
Jamie
2016/03/31 00:35:53
Do these still need to be conditional? I don't thi
Sergey Ulanov
2016/03/31 06:25:14
Done.
|
| + PostLegacyJsonMessage("onDesktopSize", std::move(data)); |
| +} |
| + |
| void ChromotingInstance::FetchSecretFromDialog( |
| bool pairing_supported, |
| const protocol::SecretFetchedCallback& secret_fetched_callback) { |