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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 | 1244 |
1245 /** | 1245 /** |
1246 * WebView.loadUrl. | 1246 * WebView.loadUrl. |
1247 */ | 1247 */ |
1248 public void loadUrl(String url) { | 1248 public void loadUrl(String url) { |
1249 if (TRACE) Log.d(TAG, "loadUrl=" + url); | 1249 if (TRACE) Log.d(TAG, "loadUrl=" + url); |
1250 // Early out to match old WebView implementation | 1250 // Early out to match old WebView implementation |
1251 if (url == null) { | 1251 if (url == null) { |
1252 return; | 1252 return; |
1253 } | 1253 } |
1254 LoadUrlParams params = new LoadUrlParams(url); | 1254 loadUrl(url, null); |
1255 loadUrl(params); | |
1256 } | 1255 } |
1257 | 1256 |
1258 /** | 1257 /** |
1259 * WebView.postUrl. | 1258 * WebView.postUrl. |
1260 */ | 1259 */ |
1261 public void postUrl(String url, byte[] postData) { | 1260 public void postUrl(String url, byte[] postData) { |
1262 if (TRACE) Log.d(TAG, "postUrl=" + url); | 1261 if (TRACE) Log.d(TAG, "postUrl=" + url); |
1263 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); | 1262 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); |
1264 Map<String, String> headers = new HashMap<String, String>(); | 1263 Map<String, String> headers = new HashMap<String, String>(); |
1265 headers.put("Content-Type", "application/x-www-form-urlencoded"); | 1264 headers.put("Content-Type", "application/x-www-form-urlencoded"); |
(...skipping 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2999 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); | 2998 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); |
3000 | 2999 |
3001 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 3000 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
3002 long resources); | 3001 long resources); |
3003 | 3002 |
3004 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3003 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
3005 String message, String targetOrigin, int[] msgPorts); | 3004 String message, String targetOrigin, int[] msgPorts); |
3006 | 3005 |
3007 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); | 3006 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); |
3008 } | 3007 } |
OLD | NEW |