summaryrefslogtreecommitdiffstats
path: root/chrome_frame/event_hooker.h
diff options
context:
space:
mode:
authorrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 15:34:11 +0000
committerrobertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-30 15:34:11 +0000
commit9ceda77323dcc335680d3cb47b0b76e2821199ad (patch)
treef5280e2a394d7d66a035b57d2c6b835bcbd7057b /chrome_frame/event_hooker.h
parentcf993864f9e684fb2e58f5b89d669ae680feefd9 (diff)
downloadchromium_src-9ceda77323dcc335680d3cb47b0b76e2821199ad.zip
chromium_src-9ceda77323dcc335680d3cb47b0b76e2821199ad.tar.gz
chromium_src-9ceda77323dcc335680d3cb47b0b76e2821199ad.tar.bz2
Add a helper process to Chrome Frame to allow for non-administrative installs. The helper process registers a hook dll that performs the necessary BHO injection instead of registering it in HKLM.
BUG=53127 TEST=Non-admin CF installs work. Review URL: http://codereview.chromium.org/3158036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57860 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/event_hooker.h')
-rw-r--r--chrome_frame/event_hooker.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/chrome_frame/event_hooker.h b/chrome_frame/event_hooker.h
new file mode 100644
index 0000000..1f62fbf
--- /dev/null
+++ b/chrome_frame/event_hooker.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2010 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.
+
+#include <windows.h>
+
+#ifndef CHROME_FRAME_EVENT_HOOKER_H_
+#define CHROME_FRAME_EVENT_HOOKER_H_
+
+class EventHooker {
+ public:
+ EventHooker();
+ ~EventHooker();
+
+ // Call this to install event hooks that will trigger on window creation
+ // and reparenting. Returns true if the hooks are successfully installed,
+ // false otherwise.
+ bool StartHook();
+
+ // Call this to remove the event hooks that are installed by StartHook().
+ void StopHook();
+
+ // The callback invoked in response to an event registered for in StartHook().
+ static VOID CALLBACK WindowCreationHookProc(HWINEVENTHOOK hook,
+ DWORD event,
+ HWND window,
+ LONG object_id,
+ LONG child_id,
+ DWORD event_tid,
+ DWORD event_time);
+
+ private:
+ HWINEVENTHOOK window_creation_hook_;
+};
+
+#endif // CHROME_FRAME_EVENT_HOOKER_H_