Use observer to provide OnRendererUnresponsive
This commit is contained in:
parent
bffb31c337
commit
a3124e8873
4 changed files with 19 additions and 14 deletions
|
@ -636,8 +636,6 @@ void WebContents::RendererUnresponsive(
|
|||
content::WebContents* source,
|
||||
const content::WebContentsUnresponsiveState& unresponsive_state) {
|
||||
Emit("unresponsive");
|
||||
if ((type_ == BROWSER_WINDOW || type_ == OFF_SCREEN) && owner_window())
|
||||
owner_window()->RendererUnresponsive(source);
|
||||
}
|
||||
|
||||
void WebContents::RendererResponsive(content::WebContents* source) {
|
||||
|
|
|
@ -49,6 +49,13 @@ class WebViewGuestDelegate;
|
|||
|
||||
namespace api {
|
||||
|
||||
// Certain events are only in WebContentsDelegate, provide our own Observer to
|
||||
// dispatch those events.
|
||||
class ExtendedWebContentsObserver {
|
||||
virtual void OnRendererResponsive() {}
|
||||
};
|
||||
|
||||
// Wrapper around the content::WebContents.
|
||||
class WebContents : public mate::TrackableObject<WebContents>,
|
||||
public CommonWebContentsDelegate,
|
||||
public content::WebContentsObserver {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue