| 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 | 1247 |
| 1248 /** | 1248 /** |
| 1249 * WebView.loadUrl. | 1249 * WebView.loadUrl. |
| 1250 */ | 1250 */ |
| 1251 public void loadUrl(String url) { | 1251 public void loadUrl(String url) { |
| 1252 if (TRACE) Log.d(TAG, "loadUrl=" + url); | 1252 if (TRACE) Log.d(TAG, "loadUrl=" + url); |
| 1253 // Early out to match old WebView implementation | 1253 // Early out to match old WebView implementation |
| 1254 if (url == null) { | 1254 if (url == null) { |
| 1255 return; | 1255 return; |
| 1256 } | 1256 } |
| 1257 LoadUrlParams params = new LoadUrlParams(url); | 1257 loadUrl(url, null); |
| 1258 loadUrl(params); | |
| 1259 } | 1258 } |
| 1260 | 1259 |
| 1261 /** | 1260 /** |
| 1262 * WebView.postUrl. | 1261 * WebView.postUrl. |
| 1263 */ | 1262 */ |
| 1264 public void postUrl(String url, byte[] postData) { | 1263 public void postUrl(String url, byte[] postData) { |
| 1265 if (TRACE) Log.d(TAG, "postUrl=" + url); | 1264 if (TRACE) Log.d(TAG, "postUrl=" + url); |
| 1266 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); | 1265 LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postD
ata); |
| 1267 Map<String, String> headers = new HashMap<String, String>(); | 1266 Map<String, String> headers = new HashMap<String, String>(); |
| 1268 headers.put("Content-Type", "application/x-www-form-urlencoded"); | 1267 headers.put("Content-Type", "application/x-www-form-urlencoded"); |
| (...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3014 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); | 3013 private native void nativeCreatePdfExporter(long nativeAwContents, AwPdfExpo
rter awPdfExporter); |
| 3015 | 3014 |
| 3016 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 3015 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
| 3017 long resources); | 3016 long resources); |
| 3018 | 3017 |
| 3019 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3018 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
| 3020 String message, String targetOrigin, int[] msgPorts); | 3019 String message, String targetOrigin, int[] msgPorts); |
| 3021 | 3020 |
| 3022 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); | 3021 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess
agePort[] ports); |
| 3023 } | 3022 } |
| OLD | NEW |