Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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 | |
| 5 #ifndef SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ | |
| 6 #define SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ | |
| 7 | |
| 8 #include <windows.h> | |
| 9 | |
| 10 #ifdef BUILDING_DLL | |
| 11 #define DLL_EXPORT __declspec(dllexport) | |
| 12 #else | |
| 13 #define DLL_EXPORT __declspec(dllimport) | |
| 14 #endif | |
| 15 | |
| 16 namespace hooking_dll { | |
| 17 | |
| 18 constexpr wchar_t g_hook_event[] = L"ChromeExtensionTestHookEvent"; | |
| 19 | |
| 20 constexpr char g_hook_handler_func[] = "HookProc"; | |
|
Will Harris
2017/06/28 12:27:54
same comment for g_hook_handler_func
| |
| 21 constexpr char g_was_hook_called_func[] = "WasHookCalled"; | |
|
Will Harris
2017/06/28 12:27:54
same comment for g_was_hook_called_func
| |
| 22 constexpr char g_set_hook_func[] = "SetHook"; | |
|
Will Harris
2017/06/28 12:27:54
same comment for g_set_hook_func
| |
| 23 | |
| 24 DLL_EXPORT void SetHook(HHOOK hook_handle); | |
| 25 | |
| 26 DLL_EXPORT bool WasHookCalled(); | |
| 27 | |
| 28 DLL_EXPORT LRESULT HookProc(int code, WPARAM w_param, LPARAM l_param); | |
| 29 | |
| 30 } // namespace hooking_dll | |
| 31 | |
| 32 #endif // SANDBOX_TESTS_INTEGRATION_TESTS_HOOKING_DLL_H_ | |
| OLD | NEW |