Move closing logic to api::BrowserWindow
Closing a BrowserWindow is essentially closing a WebContents, the logic should not be in NativeWindow.
This commit is contained in:
parent
66fab65a1a
commit
aa3eafcea1
8 changed files with 103 additions and 143 deletions
|
@ -34,9 +34,6 @@ class NativeWindowObserver {
|
|||
// Called when the window is gonna closed.
|
||||
virtual void WillCloseWindow(bool* prevent_default) {}
|
||||
|
||||
// Called before the native window object is going to be destroyed.
|
||||
virtual void WillDestroyNativeObject() {}
|
||||
|
||||
// Called when closed button is clicked.
|
||||
virtual void OnCloseButtonClicked(bool* prevent_default) {}
|
||||
|
||||
|
@ -85,12 +82,6 @@ class NativeWindowObserver {
|
|||
virtual void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {}
|
||||
#endif
|
||||
|
||||
// Called when renderer is hung.
|
||||
virtual void OnWindowUnresponsive() {}
|
||||
|
||||
// Called when renderer recovers.
|
||||
virtual void OnWindowResponsive() {}
|
||||
|
||||
// Called on Windows when App Commands arrive (WM_APPCOMMAND)
|
||||
virtual void OnExecuteWindowsCommand(const std::string& command_name) {}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue