1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef UI_VIEWS_WIN_WINDOWS_SESSION_CHANGE_OBSERVER_H_
6 #define UI_VIEWS_WIN_WINDOWS_SESSION_CHANGE_OBSERVER_H_
10 #include "base/callback.h"
11 #include "base/macros.h"
15 // Calls the provided callback on WM_WTSSESSION_CHANGE messages along with
16 // managing the tricky business of observing a singleton object.
17 class WindowsSessionChangeObserver
{
19 typedef base::Callback
<void(WPARAM
)> WtsCallback
;
20 explicit WindowsSessionChangeObserver(const WtsCallback
& callback
);
21 ~WindowsSessionChangeObserver();
24 class WtsRegistrationNotificationManager
;
26 void OnSessionChange(WPARAM wparam
);
29 WtsCallback callback_
;
31 DISALLOW_COPY_AND_ASSIGN(WindowsSessionChangeObserver
);
36 #endif // UI_VIEWS_WIN_WINDOWS_SESSION_CHANGE_OBSERVER_H_