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

Unified Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 2842693005: Store physical backing size in ViewAndroid (Closed)
Patch Set: no cvc/eventf Created 3 years, 8 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/browser/web_contents/web_contents_view_android.cc
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index 019975a1161bee7f39462b6cc43e1b8c7a6e4667..aec8e331dd4d012a955fcbceaff2d41407da6256 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -401,4 +401,13 @@ bool WebContentsViewAndroid::OnTouchEvent(const ui::MotionEventAndroid& event,
return false; // let the children handle the actual event.
}
+bool WebContentsViewAndroid::OnPhysicalBackingSizeChanged() {
+ if (web_contents_->GetRenderWidgetHostView()) {
+ // |SendScreenRects()| indirectly calls GetViewSize() that asks Java layer.
+ web_contents_->SendScreenRects();
+ return false;
+ }
+ return true;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698