Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Side by Side Diff: components/browser_watcher/endsession_watcher_window_win.h

Issue 843113002: EndSessionWatcherWindow implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge ToT. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
5 #ifndef COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_
6 #define COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_
7
8 #include <windows.h>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12
13 namespace browser_watcher {
14
15 class EndSessionWatcherWindow {
16 public:
17 typedef base::Callback<void(LPARAM)> EndSessionCallback;
18
19 explicit EndSessionWatcherWindow(const EndSessionCallback& on_end_session);
20 virtual ~EndSessionWatcherWindow();
21
22 // Exposed for testing.
23 HWND window() const { return window_; }
24
25 private:
26 LRESULT OnEndSession(WPARAM wparam, LPARAM lparam);
27
28 LRESULT WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
29
30 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
31 UINT message,
32 WPARAM wparam,
33 LPARAM lparam);
34
35 HMODULE instance_;
36 HWND window_;
37
38 EndSessionCallback on_end_session_;
39
40 DISALLOW_COPY_AND_ASSIGN(EndSessionWatcherWindow);
41 };
42
43 } // namespace browser_watcher
44
45 #endif // COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_
OLDNEW
« no previous file with comments | « components/browser_watcher.gypi ('k') | components/browser_watcher/endsession_watcher_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698