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

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

Issue 329033003: Add GetScrollOffset function to PPB_View (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | ppapi/api/ppb_view.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index 0811eba1f5d5c7cb0426baa15a1a18be97af67d4..ab2a790d3182499c926d7fcb4062f91bce63f610 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -1204,6 +1204,11 @@ void PepperPluginInstanceImpl::ViewChanged(
view_data_.css_scale =
container_->pageZoomFactor() * container_->pageScaleFactor();
+ gfx::Size scroll_offset =
+ container_->element().document().frame()->scrollOffset();
+ view_data_.scroll_offset = PP_MakePoint(scroll_offset.width(),
+ scroll_offset.height());
+
if (desired_fullscreen_state_ || view_data_.is_fullscreen) {
WebElement element = container_->element();
WebDocument document = element.document();
« no previous file with comments | « chrome/test/ppapi/ppapi_browsertest.cc ('k') | ppapi/api/ppb_view.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698