Index: android_webview/browser/aw_render_process_gone_delegate.h |
diff --git a/android_webview/browser/aw_render_process_gone_delegate.h b/android_webview/browser/aw_render_process_gone_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f1ac672a004bdc4eb311ca8b91dce3aac5531f9 |
--- /dev/null |
+++ b/android_webview/browser/aw_render_process_gone_delegate.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |
+#define ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |
+ |
+namespace content { |
+class WebContents; |
+} |
+ |
+namespace android_webview { |
+ |
+// Delegate interface to handle the events that render process was gone. |
+// |
+// Two callbacks are called when a specific render process was gone. |
Tobias Sargeant
2017/01/13 10:48:38
/a specific render process/the renderer process as
michaelbai
2017/01/13 21:01:38
Removed this
|
+// OnRenderProcessGone is called as soon as render process's termiation is |
Tobias Sargeant
2017/01/13 10:48:38
termination
michaelbai
2017/01/13 21:01:38
Done.
|
+// detected; |
+// OnRenderProcessGoneWithDetail is invoked once we know if render process |
+// crashed or was killed. |
+class AwRenderProcessGoneDelegate { |
+ public: |
+ // Returns the AwRenderProcessGoneDelegate instance associated with |
+ // the given |web_contents|. |
+ static AwRenderProcessGoneDelegate* FromWebContents( |
+ content::WebContents* web_contents); |
+ |
+ virtual void OnRenderProcessGone(int child_process_id) = 0; |
+ |
+ virtual bool OnRenderProcessGoneWithDetail(int child_process_id, |
+ bool crashed) = 0; |
+ |
+ protected: |
+ AwRenderProcessGoneDelegate() {} |
+}; |
+ |
+} // namespace android_webview |
+ |
+#endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |