mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add callbacks for unresponsive render process (fixes #3661)
The client can optionally wait or terminate the render process. Expose process exit codes via OnRenderProcessTerminated and CefGetExitCode (fixes #2126). cefclient: Add a new https://tests/hang page for testing hang behavior. cefclient: Move message and resource handling to a new BaseClientHandler class to support loading of test pages in default Chrome UI windows.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "libcef/browser/chrome/chrome_browser_host_impl.h"
|
||||
#include "libcef/browser/chrome/views/chrome_browser_view.h"
|
||||
#include "libcef/browser/chrome/views/chrome_child_window.h"
|
||||
#include "libcef/browser/hang_monitor.h"
|
||||
#include "libcef/browser/media_access_query.h"
|
||||
#include "libcef/browser/request_context_impl.h"
|
||||
#include "libcef/browser/views/browser_view_impl.h"
|
||||
@@ -361,6 +362,26 @@ ChromeBrowserDelegate::RequestMediaAccessPermissionEx(
|
||||
return callback;
|
||||
}
|
||||
|
||||
bool ChromeBrowserDelegate::RendererUnresponsiveEx(
|
||||
content::WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host,
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
if (auto browser = ChromeBrowserHostImpl::GetBrowserForBrowser(browser_)) {
|
||||
return hang_monitor::RendererUnresponsive(browser.get(), render_widget_host,
|
||||
hang_monitor_restarter);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeBrowserDelegate::RendererResponsiveEx(
|
||||
content::WebContents* source,
|
||||
content::RenderWidgetHost* render_widget_host) {
|
||||
if (auto browser = ChromeBrowserHostImpl::GetBrowserForBrowser(browser_)) {
|
||||
return hang_monitor::RendererResponsive(browser.get(), render_widget_host);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ChromeBrowserDelegate::SupportsFramelessPictureInPicture() const {
|
||||
if (!browser_->is_type_picture_in_picture()) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user