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

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

Issue 24676002: Do not clear document background in Android WebView (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase r239785 Created 7 years 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 | « no previous file | content/public/common/common_param_traits_macros.h » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_settings.h" 5 #include "android_webview/native/aw_settings.h"
6 6
7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h" 7 #include "android_webview/browser/renderer_host/aw_render_view_host_ext.h"
8 #include "android_webview/native/aw_contents.h" 8 #include "android_webview/native/aw_contents.h"
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 UpdateEverything(); 170 UpdateEverything();
171 } 171 }
172 172
173 void AwSettings::WebContentsDestroyed(content::WebContents* web_contents) { 173 void AwSettings::WebContentsDestroyed(content::WebContents* web_contents) {
174 delete this; 174 delete this;
175 } 175 }
176 176
177 // static 177 // static
178 void AwSettings::PopulateFixedPreferences(WebPreferences* web_prefs) { 178 void AwSettings::PopulateFixedPreferences(WebPreferences* web_prefs) {
179 web_prefs->shrinks_standalone_images_to_fit = false; 179 web_prefs->shrinks_standalone_images_to_fit = false;
180 web_prefs->should_clear_document_background = false;
180 } 181 }
181 182
182 void AwSettings::PopulateWebPreferences(WebPreferences* web_prefs) { 183 void AwSettings::PopulateWebPreferences(WebPreferences* web_prefs) {
183 JNIEnv* env = base::android::AttachCurrentThread(); 184 JNIEnv* env = base::android::AttachCurrentThread();
184 CHECK(env); 185 CHECK(env);
185 186
186 AwRenderViewHostExt* render_view_host_ext = GetAwRenderViewHostExt(); 187 AwRenderViewHostExt* render_view_host_ext = GetAwRenderViewHostExt();
187 if (!render_view_host_ext) return; 188 if (!render_view_host_ext) return;
188 189
189 ScopedJavaLocalRef<jobject> scoped_obj = aw_settings_.get(env); 190 ScopedJavaLocalRef<jobject> scoped_obj = aw_settings_.get(env);
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) { 324 static jstring GetDefaultUserAgent(JNIEnv* env, jclass clazz) {
324 return base::android::ConvertUTF8ToJavaString( 325 return base::android::ConvertUTF8ToJavaString(
325 env, content::GetUserAgent(GURL())).Release(); 326 env, content::GetUserAgent(GURL())).Release();
326 } 327 }
327 328
328 bool RegisterAwSettings(JNIEnv* env) { 329 bool RegisterAwSettings(JNIEnv* env) {
329 return RegisterNativesImpl(env) >= 0; 330 return RegisterNativesImpl(env) >= 0;
330 } 331 }
331 332
332 } // namespace android_webview 333 } // namespace android_webview
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698