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

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

Issue 1844143002: Add VideoLayout message. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_video_renderer.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 af4954b0e21e2222466829793dae3e7e439319ee..20142d7167b3dff97b734495b2294b66f12a0029 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) {
+ DCHECK(!dpi.is_zero());
+
+ 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());
+ data->SetInteger("x_dpi", dpi.x());
+ data->SetInteger("y_dpi", dpi.y());
+ PostLegacyJsonMessage("onDesktopSize", std::move(data));
+}
+
void ChromotingInstance::FetchSecretFromDialog(
bool pairing_supported,
const protocol::SecretFetchedCallback& secret_fetched_callback) {
« no previous file with comments | « remoting/client/plugin/chromoting_instance.h ('k') | remoting/client/plugin/pepper_video_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698