OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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; | 5 package org.chromium.android_webview; |
6 | 6 |
7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.content.ComponentCallbacks2; | 9 import android.content.ComponentCallbacks2; |
10 import android.content.Context; | 10 import android.content.Context; |
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 | 1294 |
1295 /** | 1295 /** |
1296 * WebView.loadUrl. | 1296 * WebView.loadUrl. |
1297 */ | 1297 */ |
1298 public void loadUrl(String url) { | 1298 public void loadUrl(String url) { |
1299 if (TRACE) Log.d(TAG, "loadUrl=" + url); | 1299 if (TRACE) Log.d(TAG, "loadUrl=" + url); |
1300 // Early out to match old WebView implementation | 1300 // Early out to match old WebView implementation |
1301 if (url == null) { | 1301 if (url == null) { |
1302 return; | 1302 return; |
1303 } | 1303 } |
1304 LoadUrlParams params = new LoadUrlParams(url); | 1304 loadUrl(url, null); |
1305 loadUrl(params); | |
1306 } | 1305 } |
1307 | 1306 |
1308 /** | 1307 /** |
1309 * WebView.postUrl. | 1308 * WebView.postUrl. |
1310 */ | 1309 */ |
1311 public void postUrl(String url, byte[] postData) { | 1310 public void postUrl(String url, byte[] postData) { |
1312 if (TRACE) Log.d(TAG, "postUrl=" + url); | 1311 if (TRACE) Log.d(TAG, "postUrl=" + url); |
1313 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); | 1312 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); |
1314 Map<String, String> headers = new HashMap<String, String>(); | 1313 Map<String, String> headers = new HashMap<String, String>(); |
1315 headers.put("Content-Type", "application/x-www-form-urlencoded"); | 1314 headers.put("Content-Type", "application/x-www-form-urlencoded"); |
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3061 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); | 3060 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); |
3062 | 3061 |
3063 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 3062 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
3064 long resources); | 3063 long resources); |
3065 | 3064 |
3066 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3065 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
3067 String message, String targetOrigin, int[] msgPorts); | 3066 String message, String targetOrigin, int[] msgPorts); |
3068 | 3067 |
3069 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); | 3068 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); |
3070 } | 3069 } |
OLD | NEW |