Index: android_webview/native/aw_web_contents_delegate.cc |
diff --git a/android_webview/native/aw_web_contents_delegate.cc b/android_webview/native/aw_web_contents_delegate.cc |
index 78849a90dd808383d52dbaee149fab87ecd104b3..8c76bc401bd193d7622f74f80c9eeba9786a39c0 100644 |
--- a/android_webview/native/aw_web_contents_delegate.cc |
+++ b/android_webview/native/aw_web_contents_delegate.cc |
@@ -122,6 +122,17 @@ void AwWebContentsDelegate::ActivateContents(content::WebContents* contents) { |
} |
} |
+void AwWebContentsDelegate::UpdatePreferredSize( |
+ WebContents* web_contents, |
+ const gfx::Size& pref_size) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env); |
+ if (obj.is_null()) |
+ return; |
+ return Java_AwWebContentsDelegate_updatePreferredSize( |
+ env, obj.obj(), pref_size.width(), pref_size.height()); |
+} |
+ |
bool RegisterAwWebContentsDelegate(JNIEnv* env) { |
return RegisterNativesImpl(env); |
} |