fix: revert BrowserWindow unresponsive handling refactor (#43034)
* Revert "refactor: JSify BrowserWindow unresponsive handling (#37902)"
This reverts commit 67ba30402b
.
* chore: remove BrowserWindow::SetTitleBarOverlay
---------
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
0886d2f50f
commit
2fd04a78a1
3 changed files with 59 additions and 23 deletions
|
@ -43,6 +43,9 @@ class BrowserWindow : public BaseWindow,
|
|||
|
||||
// content::WebContentsObserver:
|
||||
void BeforeUnloadDialogCancelled() override;
|
||||
void OnRendererUnresponsive(content::RenderProcessHost*) override;
|
||||
void OnRendererResponsive(
|
||||
content::RenderProcessHost* render_process_host) override;
|
||||
void WebContentsDestroyed() override;
|
||||
|
||||
// ExtendedWebContentsObserver:
|
||||
|
@ -77,6 +80,16 @@ class BrowserWindow : public BaseWindow,
|
|||
private:
|
||||
// Helpers.
|
||||
|
||||
// Schedule a notification unresponsive event.
|
||||
void ScheduleUnresponsiveEvent(int ms);
|
||||
|
||||
// Dispatch unresponsive event to observers.
|
||||
void NotifyWindowUnresponsive();
|
||||
|
||||
// Closure that would be called when window is unresponsive when closing,
|
||||
// it should be cancelled when we can prove that the window is responsive.
|
||||
base::CancelableRepeatingClosure window_unresponsive_closure_;
|
||||
|
||||
v8::Global<v8::Value> web_contents_;
|
||||
v8::Global<v8::Value> web_contents_view_;
|
||||
base::WeakPtr<api::WebContents> api_web_contents_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue