Removing #ifdef windows for endsession methods

This commit is contained in:
Hari Krishna Reddy Juturu 2017-04-24 11:49:21 -07:00
parent 9e70372c1f
commit 8a32826876
4 changed files with 5 additions and 5 deletions

View file

@ -63,6 +63,7 @@ class Window : public mate::TrackableObject<Window>,
void WillCloseWindow(bool* prevent_default) override;
void WillDestroyNativeObject() override;
void OnWindowClosed() override;
void OnWindowEndSession() override;
void OnWindowBlur() override;
void OnWindowFocus() override;
void OnWindowShow() override;
@ -92,7 +93,6 @@ class Window : public mate::TrackableObject<Window>,
const base::DictionaryValue& details) override;
#if defined(OS_WIN)
void Window::OnWindowEndSession() override;
void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) override;
#endif

View file

@ -474,12 +474,10 @@ void NativeWindow::NotifyWindowClosed() {
observer.OnWindowClosed();
}
#if defined(OS_WIN)
void NativeWindow::NotifyWindowEndSession() {
for (NativeWindowObserver& observer : observers_)
observer.OnWindowEndSession();
}
#endif
void NativeWindow::NotifyWindowBlur() {
for (NativeWindowObserver& observer : observers_)

View file

@ -218,6 +218,7 @@ class NativeWindow : public base::SupportsUserData,
// Public API used by platform-dependent delegates and observers to send UI
// related notifications.
void NotifyWindowClosed();
void NotifyWindowEndSession();
void NotifyWindowBlur();
void NotifyWindowFocus();
void NotifyWindowShow();
@ -244,7 +245,6 @@ class NativeWindow : public base::SupportsUserData,
const base::DictionaryValue& details);
#if defined(OS_WIN)
void NotifyWindowEndSession();
void NotifyWindowMessage(UINT message, WPARAM w_param, LPARAM l_param);
#endif

View file

@ -40,6 +40,9 @@ class NativeWindowObserver {
// Called when the window is closed.
virtual void OnWindowClosed() {}
// Called when Windows sends WM_ENDSESSION message
virtual void OnWindowEndSession() {}
// Called when window loses focus.
virtual void OnWindowBlur() {}
@ -78,7 +81,6 @@ class NativeWindowObserver {
// Called when window message received
#if defined(OS_WIN)
virtual void OnWindowEndSession() {}
virtual void OnWindowMessage(UINT message, WPARAM w_param, LPARAM l_param) {}
#endif