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

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: Grammar fix Created 4 years, 11 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
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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 419
420 web_prefs->allow_displaying_insecure_content = 420 web_prefs->allow_displaying_insecure_content =
421 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj); 421 Java_AwSettings_getAllowDisplayingInsecureContentLocked(env, obj);
422 web_prefs->allow_running_insecure_content = 422 web_prefs->allow_running_insecure_content =
423 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj); 423 Java_AwSettings_getAllowRunningInsecureContentLocked(env, obj);
424 424
425 web_prefs->fullscreen_supported = 425 web_prefs->fullscreen_supported =
426 Java_AwSettings_getFullscreenSupportedLocked(env, obj); 426 Java_AwSettings_getFullscreenSupportedLocked(env, obj);
427 web_prefs->record_whole_document = 427 web_prefs->record_whole_document =
428 Java_AwSettings_getRecordFullDocument(env, obj); 428 Java_AwSettings_getRecordFullDocument(env, obj);
429
430 // TODO(jww): This should be removed once sufficient warning has been given of
431 // possible API breakage because of disabling insecure use of geolocation.
432 web_prefs->allow_geolocation_on_insecure_origins = true;
429 } 433 }
430 434
431 static jlong Init(JNIEnv* env, 435 static jlong Init(JNIEnv* env,
432 const JavaParamRef<jobject>& obj, 436 const JavaParamRef<jobject>& obj,
433 const JavaParamRef<jobject>& web_contents) { 437 const JavaParamRef<jobject>& web_contents) {
434 content::WebContents* contents = content::WebContents::FromJavaWebContents( 438 content::WebContents* contents = content::WebContents::FromJavaWebContents(
435 web_contents); 439 web_contents);
436 AwSettings* settings = new AwSettings(env, obj, contents); 440 AwSettings* settings = new AwSettings(env, obj, contents);
437 return reinterpret_cast<intptr_t>(settings); 441 return reinterpret_cast<intptr_t>(settings);
438 } 442 }
439 443
440 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent( 444 static ScopedJavaLocalRef<jstring> GetDefaultUserAgent(
441 JNIEnv* env, 445 JNIEnv* env,
442 const JavaParamRef<jclass>& clazz) { 446 const JavaParamRef<jclass>& clazz) {
443 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent()); 447 return base::android::ConvertUTF8ToJavaString(env, GetUserAgent());
444 } 448 }
445 449
446 bool RegisterAwSettings(JNIEnv* env) { 450 bool RegisterAwSettings(JNIEnv* env) {
447 return RegisterNativesImpl(env); 451 return RegisterNativesImpl(env);
448 } 452 }
449 453
450 } // namespace android_webview 454 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698