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

Side by Side Diff: android_webview/test/shell/src/org/chromium/android_webview/shell/AwShellActivity.java

Issue 1882783002: [WebView] Disallow geolocation on insecure origins for apps targeting N and higher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Torne's comment Created 4 years, 8 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
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 package org.chromium.android_webview.shell; 5 package org.chromium.android_webview.shell;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.content.Intent; 9 import android.content.Intent;
10 import android.content.SharedPreferences; 10 import android.content.SharedPreferences;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 }; 179 };
180 180
181 SharedPreferences sharedPreferences = 181 SharedPreferences sharedPreferences =
182 getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE); 182 getSharedPreferences(PREFERENCES_NAME, Context.MODE_PRIVATE);
183 if (mBrowserContext == null) { 183 if (mBrowserContext == null) {
184 mBrowserContext = new AwBrowserContext(sharedPreferences, getApplica tionContext()); 184 mBrowserContext = new AwBrowserContext(sharedPreferences, getApplica tionContext());
185 } 185 }
186 final AwSettings awSettings = new AwSettings(this /* context */, 186 final AwSettings awSettings = new AwSettings(this /* context */,
187 false /* isAccessFromFileURLsGrantedByDefault */, false /* suppo rtsLegacyQuirks */, 187 false /* isAccessFromFileURLsGrantedByDefault */, false /* suppo rtsLegacyQuirks */,
188 false /* allowEmptyDocumentPersistence */); 188 false /* allowEmptyDocumentPersistence */,
189 true /* allowGeolocationOnInsecureOrigins */);
189 // Required for WebGL conformance tests. 190 // Required for WebGL conformance tests.
190 awSettings.setMediaPlaybackRequiresUserGesture(false); 191 awSettings.setMediaPlaybackRequiresUserGesture(false);
191 // Allow zoom and fit contents to screen 192 // Allow zoom and fit contents to screen
192 awSettings.setBuiltInZoomControls(true); 193 awSettings.setBuiltInZoomControls(true);
193 awSettings.setDisplayZoomControls(false); 194 awSettings.setDisplayZoomControls(false);
194 awSettings.setUseWideViewPort(true); 195 awSettings.setUseWideViewPort(true);
195 awSettings.setLoadWithOverviewMode(true); 196 awSettings.setLoadWithOverviewMode(true);
196 awSettings.setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm .TEXT_AUTOSIZING); 197 awSettings.setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm .TEXT_AUTOSIZING);
197 198
198 testContainerView.initialize(new AwContents(mBrowserContext, testContain erView, 199 testContainerView.initialize(new AwContents(mBrowserContext, testContain erView,
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 298 }
298 299
299 private void waitForDebuggerIfNeeded() { 300 private void waitForDebuggerIfNeeded() {
300 if (CommandLine.getInstance().hasSwitch(BaseSwitches.WAIT_FOR_JAVA_DEBUG GER)) { 301 if (CommandLine.getInstance().hasSwitch(BaseSwitches.WAIT_FOR_JAVA_DEBUG GER)) {
301 Log.e(TAG, "Waiting for Java debugger to connect..."); 302 Log.e(TAG, "Waiting for Java debugger to connect...");
302 android.os.Debug.waitForDebugger(); 303 android.os.Debug.waitForDebugger();
303 Log.e(TAG, "Java debugger connected. Resuming execution."); 304 Log.e(TAG, "Java debugger connected. Resuming execution.");
304 } 305 }
305 } 306 }
306 } 307 }
OLDNEW
« no previous file with comments | « android_webview/native/aw_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698