Index: components/browser_watcher/endsession_watcher_window_win.h |
diff --git a/components/browser_watcher/endsession_watcher_window_win.h b/components/browser_watcher/endsession_watcher_window_win.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b2c4c55d7317c7eb5b00cd3efa75e832d44a34dc |
--- /dev/null |
+++ b/components/browser_watcher/endsession_watcher_window_win.h |
@@ -0,0 +1,43 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+#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.
|
+#define COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_ |
+ |
+#include <windows.h> |
+ |
+#include "base/callback.h" |
+ |
+namespace browser_watcher { |
+ |
+class EndSessionWatcherWindow { |
+ public: |
+ typedef base::Callback<void(LPARAM)> EndSessionCallback; |
+ |
+ 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.
|
+ virtual ~EndSessionWatcherWindow(); |
+ |
+ // Exposed for testing. |
+ HWND window() const { return window_; } |
+ |
+ private: |
+ LRESULT OnEndSession(WPARAM wparam, LPARAM lparam); |
+ |
+ LRESULT WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); |
+ |
+ static LRESULT CALLBACK WndProcThunk(HWND hwnd, |
+ UINT message, |
+ WPARAM wparam, |
+ LPARAM lparam); |
+ |
+ HMODULE instance_; |
+ HWND window_; |
+ |
+ EndSessionCallback on_end_session_; |
+ |
+ 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.
|
+}; |
+ |
+} // namespace browser_watcher |
+ |
+#endif // COMPONENTS_BROWSER_WATCHER_ENDSESSION_WATCHER_WINDOW_WIN_H_ |