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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 // now because we need to get next callback onRenderProcessGoneWithDetai
l() to know whether | 1172 // now because we need to get next callback onRenderProcessGoneWithDetai
l() to know whether |
1173 // render process crashed or was killed. | 1173 // render process crashed or was killed. |
1174 // However, we should make WebView no operation to avoid being in weird
states. | 1174 // However, we should make WebView no operation to avoid being in weird
states. |
1175 // TODO: We might be able to combine destroyed and no operation states. | 1175 // TODO: We might be able to combine destroyed and no operation states. |
1176 mIsNoOperation = true; | 1176 mIsNoOperation = true; |
1177 } | 1177 } |
1178 | 1178 |
1179 @VisibleForTesting | 1179 @VisibleForTesting |
1180 @CalledByNative | 1180 @CalledByNative |
1181 protected boolean onRenderProcessGoneDetail(int childProcessID, boolean cras
hed) { | 1181 protected boolean onRenderProcessGoneDetail(int childProcessID, boolean cras
hed) { |
1182 if (isDestroyed(NO_WARN)) return false; | 1182 if (isDestroyed(NO_WARN)) return true; |
1183 return mContentsClient.onRenderProcessGone(new AwRenderProcessGoneDetail
( | 1183 return mContentsClient.onRenderProcessGone(new AwRenderProcessGoneDetail
( |
1184 crashed, nativeGetRendererCurrentPriority(mNativeAwContents))); | 1184 crashed, nativeGetRendererCurrentPriority(mNativeAwContents))); |
1185 } | 1185 } |
1186 | 1186 |
1187 private boolean isNoOperation() { | 1187 private boolean isNoOperation() { |
1188 return mIsNoOperation; | 1188 return mIsNoOperation; |
1189 } | 1189 } |
1190 | 1190 |
1191 private boolean isDestroyedOrNoOperation(int warnIfDestroyed) { | 1191 private boolean isDestroyedOrNoOperation(int warnIfDestroyed) { |
1192 return isDestroyed(warnIfDestroyed) || isNoOperation(); | 1192 return isDestroyed(warnIfDestroyed) || isNoOperation(); |
(...skipping 2290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3483 | 3483 |
3484 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, | 3484 private native void nativePreauthorizePermission(long nativeAwContents, Stri
ng origin, |
3485 long resources); | 3485 long resources); |
3486 | 3486 |
3487 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, | 3487 private native void nativePostMessageToFrame(long nativeAwContents, String f
rameId, |
3488 String message, String targetOrigin, MessagePort[] ports); | 3488 String message, String targetOrigin, MessagePort[] ports); |
3489 | 3489 |
3490 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); | 3490 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC
ontents); |
3491 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); | 3491 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw
Contents); |
3492 } | 3492 } |
OLD | NEW |