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

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: Make constructor explicit. 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 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698