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

Unified Diff: android_webview/native/aw_web_contents_delegate.cc

Issue 12567020: [android] Resize the android_webview if it's 0x0 initially. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | android_webview/renderer/aw_render_view_ext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « android_webview/native/aw_web_contents_delegate.h ('k') | android_webview/renderer/aw_render_view_ext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698