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.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
9 import android.app.Activity; | 9 import android.app.Activity; |
10 import android.content.ComponentCallbacks2; | 10 import android.content.ComponentCallbacks2; |
(...skipping 2338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 // Even in fullscreen mode, startActivityForResult will still use the | 2349 // Even in fullscreen mode, startActivityForResult will still use the |
2350 // initial internal access delegate because it has access to | 2350 // initial internal access delegate because it has access to |
2351 // the hidden API View#startActivityForResult. | 2351 // the hidden API View#startActivityForResult. |
2352 mFullScreenTransitionsState.getInitialInternalAccessDelegate() | 2352 mFullScreenTransitionsState.getInitialInternalAccessDelegate() |
2353 .super_startActivityForResult(intent, requestCode); | 2353 .super_startActivityForResult(intent, requestCode); |
2354 } | 2354 } |
2355 | 2355 |
2356 void startProcessTextIntent(Intent intent) { | 2356 void startProcessTextIntent(Intent intent) { |
2357 // on Android M, WebView is not able to replace the text with the proces
sed text. | 2357 // on Android M, WebView is not able to replace the text with the proces
sed text. |
2358 // So set the readonly flag for M. | 2358 // So set the readonly flag for M. |
2359 if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M) { | 2359 // TODO(hush): remove the part about VERSION.CODENAME equality with N, a
fter N release. |
| 2360 // crbug.com/543272 |
| 2361 if (Build.VERSION.SDK_INT == Build.VERSION_CODES.M && !Build.VERSION.COD
ENAME.equals("N")) { |
2360 intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, true); | 2362 intent.putExtra(Intent.EXTRA_PROCESS_TEXT_READONLY, true); |
2361 } | 2363 } |
2362 | 2364 |
2363 if (WindowAndroid.activityFromContext(mContext) == null) { | 2365 if (WindowAndroid.activityFromContext(mContext) == null) { |
2364 mContext.startActivity(intent); | 2366 mContext.startActivity(intent); |
2365 return; | 2367 return; |
2366 } | 2368 } |
2367 | 2369 |
2368 startActivityForResult(intent, PROCESS_TEXT_REQUEST_CODE); | 2370 startActivityForResult(intent, PROCESS_TEXT_REQUEST_CODE); |
2369 } | 2371 } |
(...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3452 | 3454 |
3453 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 3455 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
3454 long resources); | 3456 long resources); |
3455 | 3457 |
3456 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3458 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
3457 String message, String targetOrigin, MessagePort[] ports); | 3459 String message, String targetOrigin, MessagePort[] ports); |
3458 | 3460 |
3459 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); | 3461 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); |
3460 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); | 3462 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); |
3461 } | 3463 } |
OLD | NEW |