OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 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. | |
4 #ifndef COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_ | |
erikwright (departed)
2015/01/13 21:01:28
blank line before
Sigurður Ásgeirsson
2015/01/13 22:41:56
Done.
| |
5 #define COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_ | |
6 | |
7 #include <windows.h> | |
8 | |
9 #include "base/callback.h" | |
10 | |
11 namespace browser_watcher { | |
12 | |
13 class EndSessionWatcherWindow { | |
14 public: | |
15 typedef base::Callback<void(LPARAM)> EndSessionCallback; | |
16 | |
17 explicit EndSessionWatcherWindow(EndSessionCallback on_end_session); | |
erikwright (departed)
2015/01/13 21:01:28
const&
Sigurður Ásgeirsson
2015/01/13 22:41:56
Done.
| |
18 virtual ~EndSessionWatcherWindow(); | |
19 | |
20 // Exposed for testing. | |
21 HWND window() const { return window_; } | |
22 | |
23 private: | |
24 LRESULT OnEndSession(WPARAM wparam, LPARAM lparam); | |
25 | |
26 LRESULT WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); | |
27 | |
28 static LRESULT CALLBACK WndProcThunk(HWND hwnd, | |
29 UINT message, | |
30 WPARAM wparam, | |
31 LPARAM lparam); | |
32 | |
33 HMODULE instance_; | |
34 HWND window_; | |
35 | |
36 EndSessionCallback on_end_session_; | |
37 | |
38 DISALLOW_COPY_AND_ASSIGN(EndSessionWatcherWindow); | |
erikwright (departed)
2015/01/13 21:01:29
macros.h
Sigurður Ásgeirsson
2015/01/13 22:41:56
Done.
| |
39 }; | |
40 | |
41 } // namespace browser_watcher | |
42 | |
43 #endif // COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_ | |
OLD | NEW |