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:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "include/cef_browser.h"
|
||||
#include "include/cef_client.h"
|
||||
#include "include/cef_unresponsive_process_callback.h"
|
||||
#include "include/views/cef_browser_view.h"
|
||||
#include "libcef/browser/browser_contents_delegate.h"
|
||||
#include "libcef/browser/browser_info.h"
|
||||
@@ -238,6 +239,7 @@ class CefBrowserHostBase : public CefBrowserHost,
|
||||
void NotifyMoveOrResizeStarted() override;
|
||||
bool IsFullscreen() override;
|
||||
void ExitFullscreen(bool will_cause_resize) override;
|
||||
bool IsRenderProcessUnresponsive() override;
|
||||
|
||||
// CefBrowser methods:
|
||||
bool IsValid() override;
|
||||
@@ -341,6 +343,15 @@ class CefBrowserHostBase : public CefBrowserHost,
|
||||
}
|
||||
CefMediaStreamRegistrar* GetMediaStreamRegistrar();
|
||||
|
||||
CefRefPtr<CefUnresponsiveProcessCallback> unresponsive_process_callback()
|
||||
const {
|
||||
return unresponsive_process_callback_;
|
||||
}
|
||||
void set_unresponsive_process_callback(
|
||||
CefRefPtr<CefUnresponsiveProcessCallback> callback) {
|
||||
unresponsive_process_callback_ = callback;
|
||||
}
|
||||
|
||||
// Returns the Widget owner for the browser window. Only used with windowed
|
||||
// browsers.
|
||||
views::Widget* GetWindowWidget() const;
|
||||
@@ -391,6 +402,7 @@ class CefBrowserHostBase : public CefBrowserHost,
|
||||
|
||||
// Only accessed on the UI thread.
|
||||
std::unique_ptr<CefBrowserContentsDelegate> contents_delegate_;
|
||||
CefRefPtr<CefUnresponsiveProcessCallback> unresponsive_process_callback_;
|
||||
|
||||
// Observers that want to be notified of changes to this object.
|
||||
// Only accessed on the UI thread.
|
||||
|
Reference in New Issue
Block a user