2013-05-02 14:54:09 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2014-03-16 00:58:59 +00:00
|
|
|
#ifndef ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_
|
|
|
|
#define ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_
|
2013-05-02 14:54:09 +00:00
|
|
|
|
|
|
|
namespace atom {
|
|
|
|
|
|
|
|
class NativeWindow;
|
|
|
|
|
|
|
|
class WindowListObserver {
|
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:
|
|
|
|
virtual ~WindowListObserver() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace atom
|
|
|
|
|
2014-03-16 00:58:59 +00:00
|
|
|
#endif // ATOM_BROWSER_WINDOW_LIST_OBSERVER_H_
|