OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome_frame/test/win_event_receiver.h" | 5 #include "chrome_frame/test/win_event_receiver.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/strings/string_util.h" |
11 #include "base/win/object_watcher.h" | 12 #include "base/win/object_watcher.h" |
12 #include "base/string_util.h" | |
13 #include "chrome_frame/function_stub.h" | 13 #include "chrome_frame/function_stub.h" |
14 | 14 |
15 // WinEventReceiver methods | 15 // WinEventReceiver methods |
16 WinEventReceiver::WinEventReceiver() | 16 WinEventReceiver::WinEventReceiver() |
17 : listener_(NULL), | 17 : listener_(NULL), |
18 hook_(NULL), | 18 hook_(NULL), |
19 hook_stub_(NULL) { | 19 hook_stub_(NULL) { |
20 } | 20 } |
21 | 21 |
22 WinEventReceiver::~WinEventReceiver() { | 22 WinEventReceiver::~WinEventReceiver() { |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 HandleOnOpen(hwnd); | 266 HandleOnOpen(hwnd); |
267 } else { | 267 } else { |
268 DCHECK(event == EVENT_OBJECT_DESTROY || event == EVENT_OBJECT_HIDE); | 268 DCHECK(event == EVENT_OBJECT_DESTROY || event == EVENT_OBJECT_HIDE); |
269 HandleOnClose(hwnd); | 269 HandleOnClose(hwnd); |
270 } | 270 } |
271 } | 271 } |
272 | 272 |
273 void WindowWatchdog::OnHwndProcessExited(HWND hwnd) { | 273 void WindowWatchdog::OnHwndProcessExited(HWND hwnd) { |
274 HandleOnClose(hwnd); | 274 HandleOnClose(hwnd); |
275 } | 275 } |
OLD | NEW |