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

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

Issue 10785041: Make Chromoting client plugin always render at device DPI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
Index: remoting/client/plugin/chromoting_instance.cc
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 77cd55fdc4e10a4b4d8513f9701ef43f13215535..35a5db002a321ad973fe33fb01b80a7ad021708d 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -322,18 +322,13 @@ void ChromotingInstance::HandleMessage(const pp::Var& message) {
}
}
-void ChromotingInstance::DidChangeView(const pp::Rect& position,
- const pp::Rect& clip) {
+void ChromotingInstance::DidChangeView(const pp::View& view) {
DCHECK(plugin_message_loop_->BelongsToCurrentThread());
- SkISize new_size = SkISize::Make(position.width(), position.height());
- SkIRect new_clip =
- SkIRect::MakeXYWH(clip.x(), clip.y(), clip.width(), clip.height());
-
- view_->SetView(new_size, new_clip);
+ view_->SetView(view);
if (mouse_input_filter_.get()) {
- mouse_input_filter_->set_input_size(view_->get_view_size());
+ mouse_input_filter_->set_input_size(view_->get_view_size_dips());
Sergey Ulanov 2012/07/17 19:36:06 Do we always send mouse position in DIPs?
Wez 2012/07/17 20:11:43 We will always receive them from Pepper in DIPs, y
}
}
@@ -387,7 +382,7 @@ void ChromotingInstance::Connect(const ClientConfig& config) {
// Construct the input pipeline
mouse_input_filter_.reset(
new protocol::MouseInputFilter(host_connection_->input_stub()));
- mouse_input_filter_->set_input_size(view_->get_view_size());
+ mouse_input_filter_->set_input_size(view_->get_view_size_dips());
input_tracker_.reset(
new protocol::InputEventTracker(mouse_input_filter_.get()));

Powered by Google App Engine
This is Rietveld 408576698