electron/atom/browser/native_window_observer.h
Gavin M. Roy b08ec402d2 Add a focus event to BrowserWindow
- Tested in OSX
- Untested in GTK, but I expect it should work
- Did not see any similar constructs for notifications in Windows
2014-05-21 13:46:13 -04:00

41 lines
1.1 KiB
C++

// Copyright (c) 2013 GitHub, Inc. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ATOM_BROWSER_NATIVE_WINDOW_OBSERVER_H_
#define ATOM_BROWSER_NATIVE_WINDOW_OBSERVER_H_
#include <string>
namespace atom {
class NativeWindowObserver {
public:
virtual ~NativeWindowObserver() {}
// Called when the web page of the window has updated it's document title.
virtual void OnPageTitleUpdated(bool* prevent_default,
const std::string& title) {}
// Called when the window is gonna closed.
virtual void WillCloseWindow(bool* prevent_default) {}
// Called when the window is closed.
virtual void OnWindowClosed() {}
// Called when window loses focus.
virtual void OnWindowBlur() {}
// Called when window gains focus.
virtual void OnWindowFocus() {}
// Called when renderer is hung.
virtual void OnRendererUnresponsive() {}
// Called when renderer recovers.
virtual void OnRendererResponsive() {}
};
} // namespace atom
#endif // ATOM_BROWSER_NATIVE_WINDOW_OBSERVER_H_