2014-10-31 18:17:05 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc.
|
2014-04-25 09:49:37 +00:00
|
|
|
// Use of this source code is governed by the MIT license that can be
|
2013-05-02 14:54:09 +00:00
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#ifndef ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_
|
|
|
|
#define ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_
|
2013-05-02 14:54:09 +00:00
|
|
|
|
2018-10-25 06:43:50 +00:00
|
|
|
#include "base/observer_list_types.h"
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
namespace electron {
|
2013-05-02 14:54:09 +00:00
|
|
|
|
|
|
|
class NativeWindow;
|
|
|
|
|
2018-10-25 06:43:50 +00:00
|
|
|
class WindowListObserver : public base::CheckedObserver {
|
2013-05-03 02:53:54 +00:00
|
|
|
public:
|
2013-05-02 14:54:09 +00:00
|
|
|
// Called immediately after a window is added to the list.
|
|
|
|
virtual void OnWindowAdded(NativeWindow* window) {}
|
|
|
|
|
|
|
|
// Called immediately after a window is removed from the list.
|
|
|
|
virtual void OnWindowRemoved(NativeWindow* window) {}
|
|
|
|
|
2013-05-02 15:43:23 +00:00
|
|
|
// Called when a window close is cancelled by beforeunload handler.
|
|
|
|
virtual void OnWindowCloseCancelled(NativeWindow* window) {}
|
|
|
|
|
2013-05-02 14:54:09 +00:00
|
|
|
// Called immediately after all windows are closed.
|
|
|
|
virtual void OnWindowAllClosed() {}
|
|
|
|
|
|
|
|
protected:
|
2018-10-25 06:43:50 +00:00
|
|
|
~WindowListObserver() override {}
|
2013-05-02 14:54:09 +00:00
|
|
|
};
|
|
|
|
|
2019-06-19 21:23:04 +00:00
|
|
|
} // namespace electron
|
2013-05-02 14:54:09 +00:00
|
|
|
|
2021-11-22 07:34:31 +00:00
|
|
|
#endif // ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_
|