Index: chrome/browser/automation/ui_controls_win.cc |
=================================================================== |
--- chrome/browser/automation/ui_controls_win.cc (revision 71220) |
+++ chrome/browser/automation/ui_controls_win.cc (working copy) |
@@ -4,12 +4,12 @@ |
#include "chrome/browser/automation/ui_controls.h" |
-#include "app/keyboard_code_conversion_win.h" |
-#include "app/keyboard_codes.h" |
#include "base/logging.h" |
#include "base/message_loop.h" |
#include "base/ref_counted.h" |
#include "base/task.h" |
+#include "ui/base/keycodes/keyboard_codes.h" |
+#include "ui/base/keycodes/keyboard_code_conversion_win.h" |
#include "views/view.h" |
namespace ui_controls { |
@@ -139,10 +139,10 @@ |
// Populate the INPUT structure with the appropriate keyboard event |
// parameters required by SendInput |
-bool FillKeyboardInput(app::KeyboardCode key, INPUT* input, bool key_up) { |
+bool FillKeyboardInput(ui::KeyboardCode key, INPUT* input, bool key_up) { |
memset(input, 0, sizeof(INPUT)); |
input->type = INPUT_KEYBOARD; |
- input->ki.wVk = app::WindowsKeyCodeForKeyboardCode(key); |
+ input->ki.wVk = ui::WindowsKeyCodeForKeyboardCode(key); |
input->ki.dwFlags = key_up ? KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP : |
KEYEVENTF_EXTENDEDKEY; |
@@ -150,7 +150,7 @@ |
} |
// Send a key event (up/down) |
-bool SendKeyEvent(app::KeyboardCode key, bool up) { |
+bool SendKeyEvent(ui::KeyboardCode key, bool up) { |
INPUT input = { 0 }; |
if (!FillKeyboardInput(key, &input, up)) |
@@ -162,7 +162,7 @@ |
return true; |
} |
-bool SendKeyPressImpl(app::KeyboardCode key, |
+bool SendKeyPressImpl(ui::KeyboardCode key, |
bool control, bool shift, bool alt, |
Task* task) { |
scoped_refptr<InputDispatcher> dispatcher( |
@@ -173,7 +173,7 @@ |
// exists, send the key event directly there. |
HWND popup_menu = ::FindWindow(L"#32768", 0); |
if (popup_menu != NULL && popup_menu == ::GetTopWindow(NULL)) { |
- WPARAM w_param = app::WindowsKeyCodeForKeyboardCode(key); |
+ WPARAM w_param = ui::WindowsKeyCodeForKeyboardCode(key); |
LPARAM l_param = 0; |
::SendMessage(popup_menu, WM_KEYDOWN, w_param, l_param); |
::SendMessage(popup_menu, WM_KEYUP, w_param, l_param); |
@@ -187,19 +187,19 @@ |
UINT i = 0; |
if (control) { |
- if (!FillKeyboardInput(app::VKEY_CONTROL, &input[i], false)) |
+ if (!FillKeyboardInput(ui::VKEY_CONTROL, &input[i], false)) |
return false; |
i++; |
} |
if (shift) { |
- if (!FillKeyboardInput(app::VKEY_SHIFT, &input[i], false)) |
+ if (!FillKeyboardInput(ui::VKEY_SHIFT, &input[i], false)) |
return false; |
i++; |
} |
if (alt) { |
- if (!FillKeyboardInput(app::VKEY_MENU, &input[i], false)) |
+ if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], false)) |
return false; |
i++; |
} |
@@ -213,19 +213,19 @@ |
i++; |
if (alt) { |
- if (!FillKeyboardInput(app::VKEY_MENU, &input[i], true)) |
+ if (!FillKeyboardInput(ui::VKEY_MENU, &input[i], true)) |
return false; |
i++; |
} |
if (shift) { |
- if (!FillKeyboardInput(app::VKEY_SHIFT, &input[i], true)) |
+ if (!FillKeyboardInput(ui::VKEY_SHIFT, &input[i], true)) |
return false; |
i++; |
} |
if (control) { |
- if (!FillKeyboardInput(app::VKEY_CONTROL, &input[i], true)) |
+ if (!FillKeyboardInput(ui::VKEY_CONTROL, &input[i], true)) |
return false; |
i++; |
} |
@@ -325,14 +325,14 @@ |
// public functions ----------------------------------------------------------- |
-bool SendKeyPress(gfx::NativeWindow window, app::KeyboardCode key, |
+bool SendKeyPress(gfx::NativeWindow window, ui::KeyboardCode key, |
bool control, bool shift, bool alt, bool command) { |
DCHECK(command == false); // No command key on Windows |
return SendKeyPressImpl(key, control, shift, alt, NULL); |
} |
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window, |
- app::KeyboardCode key, |
+ ui::KeyboardCode key, |
bool control, bool shift, bool alt, |
bool command, |
Task* task) { |