window_list_observer.h 888 B

123456789101112131415161718192021222324252627282930313233
  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 ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_
  5. #define ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_
  6. namespace atom {
  7. class NativeWindow;
  8. class WindowListObserver {
  9. public:
  10. // Called immediately after a window is added to the list.
  11. virtual void OnWindowAdded(NativeWindow* window) {}
  12. // Called immediately after a window is removed from the list.
  13. virtual void OnWindowRemoved(NativeWindow* window) {}
  14. // Called when a window close is cancelled by beforeunload handler.
  15. virtual void OnWindowCloseCancelled(NativeWindow* window) {}
  16. // Called immediately after all windows are closed.
  17. virtual void OnWindowAllClosed() {}
  18. protected:
  19. virtual ~WindowListObserver() {}
  20. };
  21. } // namespace atom
  22. #endif // ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_