roll skia to 4057
[chromium-blink-merge.git] / chrome_frame / bho_loader.h
blob05033758aa22a3c53c43b1ff4d0276d5458c2beb
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.
5 #ifndef CHROME_FRAME_BHO_LOADER_H_
6 #define CHROME_FRAME_BHO_LOADER_H_
8 #include <windows.h>
10 // Forward.
11 class EventHooker;
13 // This class simulates BHO loading in an IE process. It watches for the
14 // creation of a specific window and then retrieves the web browser object
15 // for that window and simulates loading of the BHO.
16 class BHOLoader {
17 public:
18 BHOLoader();
19 ~BHOLoader();
21 // Callback invoked on receipt of an accessibility event.
22 void OnHookEvent(DWORD event, HWND window);
24 // Call this to install event hooks that will trigger on window creation
25 // and reparenting. Returns true if the hooks are successfully installed,
26 // false otherwise.
27 bool StartHook();
29 // Call this to remove the event hooks that are installed by StartHook().
30 void StopHook();
32 // Retrieve the BHOLoader instance. Note that this is NOT thread-safe.
33 static BHOLoader* GetInstance();
35 private:
36 EventHooker* hooker_;
39 #endif // CHROME_FRAME_BHO_LOADER_H_