| 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 for (Map.Entry<String, Pair<Object, Class>> entry : javascriptInterfaces
.entrySet()) { | 1150 for (Map.Entry<String, Pair<Object, Class>> entry : javascriptInterfaces
.entrySet()) { |
| 1151 @SuppressWarnings("unchecked") | 1151 @SuppressWarnings("unchecked") |
| 1152 Class<? extends Annotation> requiredAnnotation = entry.getValue().se
cond; | 1152 Class<? extends Annotation> requiredAnnotation = entry.getValue().se
cond; |
| 1153 mContentViewCore.addPossiblyUnsafeJavascriptInterface( | 1153 mContentViewCore.addPossiblyUnsafeJavascriptInterface( |
| 1154 entry.getValue().first, | 1154 entry.getValue().first, |
| 1155 entry.getKey(), | 1155 entry.getKey(), |
| 1156 requiredAnnotation); | 1156 requiredAnnotation); |
| 1157 } | 1157 } |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 @CalledByNative |
| 1161 private void onRenderProcessGone(int childProcessID) { |
| 1162 } |
| 1163 |
| 1164 @CalledByNative |
| 1165 private boolean onRenderProcessGoneDetail(int childProcessID, boolean crashe
d) { |
| 1166 if (isDestroyed(NO_WARN)) return false; |
| 1167 return mContentsClient.onRenderProcessGone(new AwRenderProcessGoneDetail
(crashed)); |
| 1168 } |
| 1169 |
| 1160 /** | 1170 /** |
| 1161 * Destroys this object and deletes its native counterpart. | 1171 * Destroys this object and deletes its native counterpart. |
| 1162 */ | 1172 */ |
| 1163 public void destroy() { | 1173 public void destroy() { |
| 1164 if (TRACE) Log.i(TAG, "%s destroy", this); | 1174 if (TRACE) Log.i(TAG, "%s destroy", this); |
| 1165 if (isDestroyed(NO_WARN)) return; | 1175 if (isDestroyed(NO_WARN)) return; |
| 1166 | 1176 |
| 1167 // Remove pending messages | 1177 // Remove pending messages |
| 1168 mContentsClient.getCallbackHelper().removeCallbacksAndMessages(); | 1178 mContentsClient.getCallbackHelper().removeCallbacksAndMessages(); |
| 1169 | 1179 |
| (...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3392 | 3402 |
| 3393 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3403 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
| 3394 String message, String targetOrigin, int[] msgPorts); | 3404 String message, String targetOrigin, int[] msgPorts); |
| 3395 | 3405 |
| 3396 private native void nativeCreateMessageChannel( | 3406 private native void nativeCreateMessageChannel( |
| 3397 long nativeAwContents, AppWebMessagePort[] ports); | 3407 long nativeAwContents, AppWebMessagePort[] ports); |
| 3398 | 3408 |
| 3399 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); | 3409 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); |
| 3400 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); | 3410 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); |
| 3401 } | 3411 } |
| OLD | NEW |