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

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: 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_contents.h ('k') | android_webview/native/aw_settings.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/native/aw_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index 6d2db78021772ce6a6f898f1bcf63ba0d4636ff6..b1b53eeb1c515fdc1a35a656d778799e8615a8fb 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -628,7 +628,8 @@ jint AwContents::ReleasePopupWebContents(JNIEnv* env, jobject obj) {
gfx::Point AwContents::GetLocationOnScreen() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
- if (obj.is_null()) return gfx::Point();
+ if (obj.is_null())
+ return gfx::Point();
std::vector<int> location;
base::android::JavaIntArrayToIntVector(
env,
@@ -637,6 +638,14 @@ 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;
+ Java_AwContents_onPageScaleFactorChanged(env, obj.obj(), page_scale_factor);
+}
+
ScopedJavaLocalRef<jobject> AwContents::CapturePicture(JNIEnv* env,
jobject obj) {
return browser_view_renderer_->CapturePicture();
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698