window_list_observer.h 759 B

12345678910111213141516171819202122232425262728
  1. // Copyright (c) 2013 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_
  5. #define ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_
  6. #include "base/observer_list_types.h"
  7. namespace electron {
  8. class NativeWindow;
  9. class WindowListObserver : public base::CheckedObserver {
  10. public:
  11. // Called when a window close is cancelled by beforeunload handler.
  12. virtual void OnWindowCloseCancelled(NativeWindow* window) {}
  13. // Called immediately after all windows are closed.
  14. virtual void OnWindowAllClosed() {}
  15. protected:
  16. ~WindowListObserver() override {}
  17. };
  18. } // namespace electron
  19. #endif // ELECTRON_SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_