Index: sandbox/win/tests/integration_tests/hooking_dll.h |
diff --git a/sandbox/win/tests/integration_tests/hooking_dll.h b/sandbox/win/tests/integration_tests/hooking_dll.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a36c436ce44a71dc75413169bc08337a3abfe9c5 |
--- /dev/null |
+++ b/sandbox/win/tests/integration_tests/hooking_dll.h |
@@ -0,0 +1,32 @@ |
+// Copyright 2016 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. |
+ |
+#ifndef SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ |
+#define SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ |
+ |
+#include <windows.h> |
+ |
+#ifdef BUILDING_DLL |
+#define DLL_EXPORT __declspec(dllexport) |
+#else |
+#define DLL_EXPORT __declspec(dllimport) |
+#endif |
+ |
+namespace hooking_dll { |
+ |
+constexpr wchar_t g_hook_event[] = L"ChromeExtensionTestHookEvent"; |
+ |
+constexpr char g_hook_handler_func[] = "HookProc"; |
Will Harris
2017/06/28 12:27:54
same comment for g_hook_handler_func
|
+constexpr char g_was_hook_called_func[] = "WasHookCalled"; |
Will Harris
2017/06/28 12:27:54
same comment for g_was_hook_called_func
|
+constexpr char g_set_hook_func[] = "SetHook"; |
Will Harris
2017/06/28 12:27:54
same comment for g_set_hook_func
|
+ |
+DLL_EXPORT void SetHook(HHOOK hook_handle); |
+ |
+DLL_EXPORT bool WasHookCalled(); |
+ |
+DLL_EXPORT LRESULT HookProc(int code, WPARAM w_param, LPARAM l_param); |
+ |
+} // namespace hooking_dll |
+ |
+#endif // SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ |