OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 5 #ifndef CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ | 6 #define CHROME_FRAME_TEST_CHROME_FRAME_TEST_UTILS_H_ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/process_util.h" | 11 #include "base/process_util.h" |
12 | 12 |
13 namespace chrome_frame_test { | 13 namespace chrome_frame_test { |
14 | 14 |
15 bool IsTopLevelWindow(HWND window); | 15 bool IsTopLevelWindow(HWND window); |
16 int CloseVisibleWindowsOnAllThreads(HANDLE process); | 16 int CloseVisibleWindowsOnAllThreads(HANDLE process); |
17 bool ForceSetForegroundWindow(HWND window); | 17 bool ForceSetForegroundWindow(HWND window); |
18 bool EnsureProcessInForeground(base::ProcessId process_id); | 18 bool EnsureProcessInForeground(base::ProcessId process_id); |
19 | 19 |
20 // Iterates through all the characters in the string and simulates | 20 // Iterates through all the characters in the string and simulates |
21 // keyboard input. The input goes to the currently active application. | 21 // keyboard input. The input goes to the currently active application. |
22 bool SendString(const wchar_t* s); | 22 bool SendString(const wchar_t* s); |
23 | 23 |
24 // Sends a virtual key such as VK_TAB, VK_RETURN or a character that has been | 24 // Sends a virtual key such as VK_TAB, VK_RETURN or a character that has been |
25 // translated to a virtual key. | 25 // translated to a virtual key. |
26 void SendVirtualKey(int16 key); | 26 // The extended flag indicates if this is an extended key |
| 27 void SendVirtualKey(int16 key, bool extended); |
27 | 28 |
28 // Translates a single char to a virtual key and calls SendVirtualKey. | 29 // Translates a single char to a virtual key and calls SendVirtualKey. |
29 void SendChar(char c); | 30 void SendChar(char c); |
30 | 31 |
31 // Sends an ascii string, char by char (calls SendChar for each). | 32 // Sends an ascii string, char by char (calls SendChar for each). |
32 void SendString(const char* s); | 33 void SendString(const char* s); |
33 | 34 |
34 // Sends a keystroke to the currently active application with optional | 35 // Sends a keystroke to the currently active application with optional |
35 // modifiers set. | 36 // modifiers set. |
36 bool SendMnemonic(WORD mnemonic_char, bool shift_pressed, bool control_pressed, | 37 bool SendMnemonic(WORD mnemonic_char, bool shift_pressed, bool control_pressed, |
(...skipping 27 matching lines...) Expand all Loading... |
64 // Chrome frame option. | 65 // Chrome frame option. |
65 void SelectAboutChromeFrame(); | 66 void SelectAboutChromeFrame(); |
66 | 67 |
67 // Returns a handle to the chrome frame render widget child window. | 68 // Returns a handle to the chrome frame render widget child window. |
68 // Returns NULL on failure. | 69 // Returns NULL on failure. |
69 HWND GetChromeRendererWindow(); | 70 HWND GetChromeRendererWindow(); |
70 | 71 |
71 } // namespace chrome_frame_test | 72 } // namespace chrome_frame_test |
72 | 73 |
73 #endif // CHROME_FRAME_CHROMETAB_UNITTESTS_CF_TEST_UTILS_H_ | 74 #endif // CHROME_FRAME_CHROMETAB_UNITTESTS_CF_TEST_UTILS_H_ |
OLD | NEW |