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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 10544168: Implement HiDPI support in Pepper dev interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to Graphics2DDev C++ header Created 8 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: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 5cb484f53717ca31d0695b18b16b13e376140ad8..2ae47b5e482e1b58106081826ef07b2aad7bc312 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -750,6 +750,18 @@ void PluginInstance::ViewChanged(const gfx::Rect& position,
view_data_.rect = PP_FromGfxRect(position);
view_data_.clip_rect = PP_FromGfxRect(clip);
+#if WEBPLUGINCONTAINER_HAS_GETDEVICESCALEFACTOR
+ view_data_.device_scale = container_->getDeviceScaleFactor();
+#else
+ view_data_.device_scale = 1.0f;
+#endif // WEBPLUGINCONTAINER_HAS_GETDEVICESCALEFACTOR
+
+#if WEBPLUGINCONTAINER_HAS_GETPAGEZOOMFACTOR
+ view_data_.css_scale = container_->getPageZoomFactor();
+#else
+ view_data_.css_scale = 1.0f;
+#endif // WEBPLUGINCONTAINER_HAS_GETPAGEZOOMFACTOR
+
if (desired_fullscreen_state_ || view_data_.is_fullscreen) {
WebElement element = container_->element();
WebDocument document = element.document();

Powered by Google App Engine
This is Rietveld 408576698