| Index: android_webview/native/aw_contents.cc
|
| diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc
|
| index bfe2e967317d128d0e4f23719bed417bd32231e7..dfd03265d3a4b4b10f571ae05299b3f9299eb23d 100644
|
| --- a/android_webview/native/aw_contents.cc
|
| +++ b/android_webview/native/aw_contents.cc
|
| @@ -186,6 +186,12 @@ AwSafeBrowsingUIManager::UIManagerClient::FromWebContents(
|
| return AwContents::FromWebContents(web_contents);
|
| }
|
|
|
| +// static
|
| +AwRenderProcessGoneDelegate* AwRenderProcessGoneDelegate::FromWebContents(
|
| + content::WebContents* web_contents) {
|
| + return AwContents::FromWebContents(web_contents);
|
| +}
|
| +
|
| AwContents::AwContents(std::unique_ptr<WebContents> web_contents)
|
| : content::WebContentsObserver(web_contents.get()),
|
| functor_(nullptr),
|
| @@ -1315,4 +1321,26 @@ bool AwContents::CanShowInterstitial() {
|
| return Java_AwContents_canShowInterstitial(env, obj);
|
| }
|
|
|
| +void AwContents::OnRenderProcessGone(int child_process_id) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + JNIEnv* env = AttachCurrentThread();
|
| + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
|
| + if (obj.is_null())
|
| + return;
|
| +
|
| + Java_AwContents_onRenderProcessGone(env, obj, child_process_id);
|
| +}
|
| +
|
| +bool AwContents::OnRenderProcessGoneDetail(int child_process_id,
|
| + bool crashed) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
| + JNIEnv* env = AttachCurrentThread();
|
| + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
|
| + if (obj.is_null())
|
| + return false;
|
| +
|
| + return Java_AwContents_onRenderProcessGoneDetail(env, obj,
|
| + child_process_id, crashed);
|
| +}
|
| +
|
| } // namespace android_webview
|
|
|