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

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

Issue 1530403002: Removal of geolocation APIs on insecure origins (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Fix unit test Created 5 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
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/common/aw_content_client.h" 8 #include "android_webview/common/aw_content_client.h"
9 #include "android_webview/native/aw_contents.h" 9 #include "android_webview/native/aw_contents.h"
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 427
428 web_prefs->allow_displaying_insecure_content = 428 web_prefs->allow_displaying_insecure_content =
429 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); 429 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj);
430 web_prefs->allow_running_insecure_content = 430 web_prefs->allow_running_insecure_content =
431 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); 431 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj);
432 432
433 web_prefs->fullscreen_supported = 433 web_prefs->fullscreen_supported =
434 Java_AwSettings_getFullscreenSupportedLocked(env, obj); 434 Java_AwSettings_getFullscreenSupportedLocked(env, obj);
435 web_prefs->record_whole_document = 435 web_prefs->record_whole_document =
436 Java_AwSettings_getRecordFullDocument(env, obj); 436 Java_AwSettings_getRecordFullDocument(env, obj);
437
438 // TODO(jww): This should be removed once sufficient warning has been given of
439 // possible API breakage because of disabling insecure use of geolocation.
440 web_prefs->allow_geolocation_on_insecure_origins = true;
437 } 441 }
438 442
439 static jlong Init(JNIEnv* env, 443 static jlong Init(JNIEnv* env,
440 const JavaParamRef<jobject>& obj, 444 const JavaParamRef<jobject>& obj,
441 const JavaParamRef<jobject>& web_contents) { 445 const JavaParamRef<jobject>& web_contents) {
442 content::WebContents* contents = content::WebContents::FromJavaWebContents( 446 content::WebContents* contents = content::WebContents::FromJavaWebContents(
443 web_contents); 447 web_contents);
444 AwSettings* settings = new AwSettings(env, obj, contents); 448 AwSettings* settings = new AwSettings(env, obj, contents);
445 return reinterpret_cast<intptr_t>(settings); 449 return reinterpret_cast<intptr_t>(settings);
446 } 450 }
447 451
448 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( 452 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent(
449 JNIEnv* env, 453 JNIEnv* env,
450 const JavaParamRef<jclass>& clazz) { 454 const JavaParamRef<jclass>& clazz) {
451 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); 455 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent());
452 } 456 }
453 457
454 bool RegisterAwSettings(JNIEnv* env) { 458 bool RegisterAwSettings(JNIEnv* env) {
455 return RegisterNativesImpl(env); 459 return RegisterNativesImpl(env);
456 } 460 }
457 461
458 } // namespace android_webview 462 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698