OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 #ifndef CHROME_FRAME_TEST_NET_PROCESS_SINGLETON_SUBCLASS_H_ | |
5 #define CHROME_FRAME_TEST_NET_PROCESS_SINGLETON_SUBCLASS_H_ | |
6 | |
7 #include <windows.h> | |
8 | |
9 #include <string> | |
10 | |
11 class FilePath; | |
12 struct FunctionStub; | |
13 | |
14 class ProcessSingletonSubclassDelegate { | |
15 public: | |
16 virtual void OnConnectAutomationProviderToChannel( | |
17 const std::string& channel_id) = 0; | |
18 }; | |
19 | |
20 class ProcessSingletonSubclass { | |
21 public: | |
22 explicit ProcessSingletonSubclass(ProcessSingletonSubclassDelegate* delegate); | |
23 ~ProcessSingletonSubclass(); | |
24 | |
25 bool Subclass(const FilePath& user_data_dir); | |
26 | |
27 protected: | |
28 static LRESULT CALLBACK SubclassWndProc(ProcessSingletonSubclass* me, | |
29 HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); | |
30 LRESULT OnCopyData(HWND hwnd, HWND from_hwnd, const COPYDATASTRUCT* cds); | |
31 protected: | |
32 FunctionStub* stub_; | |
33 ProcessSingletonSubclassDelegate* delegate_; | |
34 WNDPROC original_wndproc_; | |
35 }; | |
36 | |
37 #endif // CHROME_FRAME_TEST_NET_PROCESS_SINGLETON_SUBCLASS_H_ | |
OLD | NEW |