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

Unified Diff: android_webview/native/aw_contents.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: don't re-layout while pinch-zooming 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
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 61c934585cef14e31363d01df2166b5087703274..bdd208e0e0867074df263300b270141f077a2ad3 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -629,6 +629,13 @@ gfx::Point AwContents::GetLocationOnScreen() {
return gfx::Point(location[0], location[1]);
}
+void AwContents::OnPageScaleFactorChanged(float page_scale_factor) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (obj.is_null()) return;
joth 2013/04/10 22:06:23 nit: \n before return in c++
mkosiba (inactive) 2013/04/12 16:42:19 Done.
+ Java_AwContents_onPageScaleFactorChanged(env, obj.obj(), page_scale_factor);
+}
+
ScopedJavaLocalRef<jobject> AwContents::CapturePicture(JNIEnv* env,
jobject obj) {
return browser_view_renderer_->CapturePicture();

Powered by Google App Engine
This is Rietveld 408576698