diff options
author | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-30 15:34:11 +0000 |
---|---|---|
committer | robertshield@chromium.org <robertshield@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-30 15:34:11 +0000 |
commit | 9ceda77323dcc335680d3cb47b0b76e2821199ad (patch) | |
tree | f5280e2a394d7d66a035b57d2c6b835bcbd7057b /chrome_frame/chrome_frame_helper_dll.cc | |
parent | cf993864f9e684fb2e58f5b89d669ae680feefd9 (diff) | |
download | chromium_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/chrome_frame_helper_dll.cc')
-rw-r--r-- | chrome_frame/chrome_frame_helper_dll.cc | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/chrome_frame/chrome_frame_helper_dll.cc b/chrome_frame/chrome_frame_helper_dll.cc new file mode 100644 index 0000000..2c3a4a8 --- /dev/null +++ b/chrome_frame/chrome_frame_helper_dll.cc @@ -0,0 +1,28 @@ +// 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. + +// chrome_frame_helper_dll.cc : Implementation of a helper DLL that initializes +// a listener for WinEvent hooks on load. +// +// Calling the StartUserModeBrowserInjection will set an in-context WinEvent +// hook that will cause this DLL to get loaded in any process that sends +// EVENT_OBJECT_CREATE accessibility events. This is a poor substitute to +// getting in via vetted means (i.e. real BHO registration). + +#include "chrome_frame/bho_loader.h" +#include "chrome_frame/chrome_frame_helper_util.h" + +STDAPI StartUserModeBrowserInjection() { + return BHOLoader::GetInstance()->StartHook() ? S_OK : E_FAIL; +} + +STDAPI StopUserModeBrowserInjection() { + BHOLoader::GetInstance()->StopHook(); + return S_OK; +} + +BOOL APIENTRY DllMain(HMODULE module, DWORD reason_for_call, void* reserved) { + return TRUE; +} + |