| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |