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

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

Issue 2094843002: Scale menu position back to viewport in pepper plugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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/renderer_ppapi_host_impl.h
diff --git a/content/renderer/pepper/renderer_ppapi_host_impl.h b/content/renderer/pepper/renderer_ppapi_host_impl.h
index 8cb6a5d8d4e0e9582fa347cf310d8a9ecc075182..668b9c229bd80e3f1572ffa24909f8b226bea841 100644
--- a/content/renderer/pepper/renderer_ppapi_host_impl.h
+++ b/content/renderer/pepper/renderer_ppapi_host_impl.h
@@ -104,6 +104,11 @@ class RendererPpapiHostImpl : public RendererPpapiHost {
const override;
GURL GetDocumentURL(PP_Instance pp_instance) const override;
+ void set_viewport_to_dip_scale(float viewport_to_dip_scale) {
+ DCHECK_LT(0, viewport_to_dip_scale_);
+ viewport_to_dip_scale_ = viewport_to_dip_scale;
+ }
+
private:
RendererPpapiHostImpl(PluginModule* module,
ppapi::proxy::HostDispatcher* dispatcher,
@@ -136,6 +141,9 @@ class RendererPpapiHostImpl : public RendererPpapiHost {
// Whether this is a host for external plugins.
bool is_external_plugin_host_;
+ // The scale between the viewport and dip.
+ float viewport_to_dip_scale_ = 1.0f;
+
DISALLOW_COPY_AND_ASSIGN(RendererPpapiHostImpl);
};
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/pepper/renderer_ppapi_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698