Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2514)

Unified Diff: android_webview/native/aw_contents.cc

Issue 2651743006: Implement Crash Handle API (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « android_webview/native/aw_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698