OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |
| 7 |
| 8 namespace content { |
| 9 class WebContents; |
| 10 } |
| 11 |
| 12 namespace android_webview { |
| 13 |
| 14 // Delegate interface to handle the events that render process was gone. |
| 15 class AwRenderProcessGoneDelegate { |
| 16 public: |
| 17 // Returns the AwRenderProcessGoneDelegate instance associated with |
| 18 // the given |web_contents|. |
| 19 static AwRenderProcessGoneDelegate* FromWebContents( |
| 20 content::WebContents* web_contents); |
| 21 |
| 22 // Notify render process's termination is detected. |
| 23 virtual void OnRenderProcessGone(int child_process_id) = 0; |
| 24 |
| 25 // Notify if render process crashed or was killed, this callback is |
| 26 // invoked after OnRenderProcessGone() because the detail information |
| 27 // can't be obtained immediately when render process's termination is |
| 28 // detected. |
| 29 virtual bool OnRenderProcessGoneDetail(int child_process_id, |
| 30 bool crashed) = 0; |
| 31 |
| 32 protected: |
| 33 AwRenderProcessGoneDelegate() {} |
| 34 }; |
| 35 |
| 36 } // namespace android_webview |
| 37 |
| 38 #endif // ANDROID_WEBVIEW_BROWSER_AW_RENDER_PROCESS_GONE_DELEGATE_H_ |
OLD | NEW |