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

Side by Side Diff: android_webview/native/aw_contents.cc

Issue 418883002: Simplify wrap_contents mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix findbugs Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_settings.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "android_webview/native/aw_contents.h" 5 #include "android_webview/native/aw_contents.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "android_webview/browser/aw_browser_context.h" 9 #include "android_webview/browser/aw_browser_context.h"
10 #include "android_webview/browser/aw_browser_main_parts.h" 10 #include "android_webview/browser/aw_browser_main_parts.h"
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 1077
1078 const BrowserViewRenderer* AwContents::GetBrowserViewRenderer() const { 1078 const BrowserViewRenderer* AwContents::GetBrowserViewRenderer() const {
1079 return &browser_view_renderer_; 1079 return &browser_view_renderer_;
1080 } 1080 }
1081 1081
1082 void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale) { 1082 void AwContents::SetDipScale(JNIEnv* env, jobject obj, jfloat dip_scale) {
1083 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1083 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1084 browser_view_renderer_.SetDipScale(dip_scale); 1084 browser_view_renderer_.SetDipScale(dip_scale);
1085 } 1085 }
1086 1086
1087 void AwContents::SetFixedLayoutSize(JNIEnv* env,
1088 jobject obj,
1089 jint width_dip,
1090 jint height_dip) {
1091 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1092 render_view_host_ext_->SetFixedLayoutSize(gfx::Size(width_dip, height_dip));
1093 }
1094
1095 void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint x, jint y) { 1087 void AwContents::ScrollTo(JNIEnv* env, jobject obj, jint x, jint y) {
1096 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1088 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1097 browser_view_renderer_.ScrollTo(gfx::Vector2d(x, y)); 1089 browser_view_renderer_.ScrollTo(gfx::Vector2d(x, y));
1098 } 1090 }
1099 1091
1100 void AwContents::OnWebLayoutPageScaleFactorChanged(float page_scale_factor) { 1092 void AwContents::OnWebLayoutPageScaleFactorChanged(float page_scale_factor) {
1101 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 1093 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
1102 JNIEnv* env = AttachCurrentThread(); 1094 JNIEnv* env = AttachCurrentThread();
1103 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 1095 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1104 if (obj.is_null()) 1096 if (obj.is_null())
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } 1169 }
1178 1170
1179 browser_view_renderer_.TrimMemory(level, visible); 1171 browser_view_renderer_.TrimMemory(level, visible);
1180 } 1172 }
1181 1173
1182 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { 1174 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) {
1183 g_should_download_favicons = true; 1175 g_should_download_favicons = true;
1184 } 1176 }
1185 1177
1186 } // namespace android_webview 1178 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | android_webview/native/aw_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698