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

Unified Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 1609193002: [UseZoomForDSF] Alwatys use DIP coordinates in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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: content/renderer/pepper/pepper_plugin_instance_impl.h
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index cb9b60cc0286674f31746369b61ac793e98b9750..c02a4505452d7616c1296f5b8d9618d5cd4eab91 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -91,6 +91,7 @@ class TextureLayer;
namespace gfx {
class Range;
+class Rect;
}
namespace ppapi {
@@ -695,6 +696,10 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
void RecordFlashJavaScriptUse();
+ // Converts the PP_Rect between DIP and Viewport.
+ void ConvertRectToDIP(PP_Rect* rect) const;
+ void ConvertDIPToViewport(gfx::Rect* rect) const;
+
RenderFrameImpl* render_frame_;
base::Closure instance_deleted_callback_;
scoped_refptr<PluginModule> module_;
@@ -743,6 +748,8 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
ppapi::ViewData last_sent_view_data_;
// The current unobscured portion of the plugin.
gfx::Rect unobscured_rect_;
+ // The viewport coordinates to window coordinates ratio.
+ float viewport_to_dip_scale_;
// Indicates if we've ever sent a didChangeView to the plugin. This ensures we
// always send an initial notification, even if the position and clip are the

Powered by Google App Engine
This is Rietveld 408576698