blob: fb8661b33cf8e62d0fbc781c6d69bdb48d1c8229 [file] [log] [blame]
// 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.
namespace content {
class WebContents;
namespace android_webview {
// Delegate interface to handle the events that render process was gone.
class AwRenderProcessGoneDelegate {
// Returns the AwRenderProcessGoneDelegate instance associated with
// the given |web_contents|.
static AwRenderProcessGoneDelegate* FromWebContents(
content::WebContents* web_contents);
// Notify render process's termination is detected.
virtual void OnRenderProcessGone(int child_process_id) = 0;
// Notify if render process crashed or was killed, this callback is
// invoked after OnRenderProcessGone() because the detail information
// can't be obtained immediately when render process's termination is
// detected.
virtual bool OnRenderProcessGoneDetail(int child_process_id,
bool crashed) = 0;
AwRenderProcessGoneDelegate() {}
} // namespace android_webview