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

Unified Diff: chrome/browser/android/compositor/compositor_view.cc

Issue 2842693005: Store physical backing size in ViewAndroid (Closed)
Patch Set: no UpdateLayerBounds Created 3 years, 7 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: chrome/browser/android/compositor/compositor_view.cc
diff --git a/chrome/browser/android/compositor/compositor_view.cc b/chrome/browser/android/compositor/compositor_view.cc
index 5482249140cde0af9becb64b4d887e783ec4f003..4b525711cbc5f59c6f6a1e0f101bafb52872234a 100644
--- a/chrome/browser/android/compositor/compositor_view.cc
+++ b/chrome/browser/android/compositor/compositor_view.cc
@@ -167,6 +167,18 @@ void CompositorView::SurfaceChanged(JNIEnv* env,
root_layer_->SetBounds(gfx::Size(content_width_, content_height_));
}
+void CompositorView::OnPhysicalBackingSizeChanged(
+ JNIEnv* env,
+ const JavaParamRef<jobject>& obj,
+ const JavaParamRef<jobject>& jweb_contents,
+ jint width,
+ jint height) {
+ content::WebContents* web_contents =
+ content::WebContents::FromJavaWebContents(jweb_contents);
+ gfx::Size size(width, height);
+ web_contents->GetNativeView()->OnPhysicalBackingSizeChanged(size);
+}
+
void CompositorView::SetLayoutBounds(JNIEnv* env,
const JavaParamRef<jobject>& object) {
root_layer_->SetBounds(gfx::Size(content_width_, content_height_));

Powered by Google App Engine
This is Rietveld 408576698