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

Unified Diff: android_webview/native/aw_contents.cc

Issue 23583025: [android_webview] Use auto-sizing for webviews in wrap content mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add test Created 7 years, 4 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/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_contents.cc
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
index dd8db0a43d62b20fe520441fc1157b3d888e1cab..f374deee62d4e230c85a037dc54a12a4576cbe1f 100644
--- a/android_webview/native/aw_contents.cc
+++ b/android_webview/native/aw_contents.cc
@@ -50,6 +50,7 @@
#include "ui/base/l10n/l10n_util_android.h"
#include "ui/gfx/android/java_bitmap.h"
#include "ui/gfx/image/image.h"
+#include "ui/gfx/size.h"
struct AwDrawSWFunctionTable;
struct AwDrawGLFunctionTable;
@@ -743,14 +744,21 @@ void AwContents::DidOverscroll(gfx::Vector2d overscroll_delta) {
env, obj.obj(), overscroll_delta.x(), overscroll_delta.y());
}
-void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dipScale) {
- browser_view_renderer_->SetDipScale(dipScale);
+void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale) {
+ browser_view_renderer_->SetDipScale(dip_scale);
}
void AwContents::SetDisplayedPageScaleFactor(JNIEnv* env,
jobject obj,
- jfloat pageScaleFactor) {
- browser_view_renderer_->SetPageScaleFactor(pageScaleFactor);
+ jfloat page_scale_factor) {
+ browser_view_renderer_->SetPageScaleFactor(page_scale_factor);
+}
+
+void AwContents::SetAutoResizeMode(JNIEnv* env,
+ jobject obj,
+ jboolean enabled,
+ jint width_dip) {
+ render_view_host_ext_->SetAutoResizeMode(enabled, width_dip);
}
void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint xPix, jint yPix) {
« no previous file with comments | « android_webview/native/aw_contents.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