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

Side by Side Diff: chrome_frame/test/window_watchdog.h

Issue 3032024: Add undeclared virtual destructors part 2... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome_frame/np_event_listener.h ('k') | printing/printed_pages_source.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_ 5 #ifndef CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_
6 #define CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_ 6 #define CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_
7 7
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 struct FunctionStub; 13 struct FunctionStub;
14 14
15 // Interface implemented by WindowWatchdog users. An observer can register 15 // Interface implemented by WindowWatchdog users. An observer can register
16 // for notifications on multiple window classes. 16 // for notifications on multiple window classes.
17 class WindowObserver { // NOLINT 17 class WindowObserver { // NOLINT
18 public: 18 public:
19 virtual void OnWindowDetected(HWND hwnd, const std::string& caption) = 0; 19 virtual void OnWindowDetected(HWND hwnd, const std::string& caption) = 0;
20
21 protected:
22 virtual ~WindowObserver() {}
20 }; 23 };
21 24
22 // Watch a for window to be shown with the given window class name. 25 // Watch a for window to be shown with the given window class name.
23 // If found, call the observer interested in it. 26 // If found, call the observer interested in it.
24 class WindowWatchdog { 27 class WindowWatchdog {
25 public: 28 public:
26 WindowWatchdog(); 29 WindowWatchdog();
27 ~WindowWatchdog(); 30 ~WindowWatchdog();
28 31
29 // Register for notifications for |window_class|. An observer can register 32 // Register for notifications for |window_class|. An observer can register
(...skipping 21 matching lines...) Expand all
51 54
52 typedef std::vector<WindowObserverEntry> ObserverMap; 55 typedef std::vector<WindowObserverEntry> ObserverMap;
53 56
54 HWINEVENTHOOK hook_; 57 HWINEVENTHOOK hook_;
55 ObserverMap observers_; 58 ObserverMap observers_;
56 FunctionStub* hook_stub_; 59 FunctionStub* hook_stub_;
57 }; 60 };
58 61
59 62
60 #endif // CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_ 63 #endif // CHROME_FRAME_TEST_WINDOW_WATCHDOG_H_
OLDNEW
« no previous file with comments | « chrome_frame/np_event_listener.h ('k') | printing/printed_pages_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698