summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc120
-rw-r--r--chrome/browser/autocomplete/autocomplete_edit_view_win.cc28
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc8
-rw-r--r--chrome/browser/automation/automation_provider_win.cc4
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc2
-rw-r--r--chrome/browser/automation/ui_controls.h6
-rw-r--r--chrome/browser/automation/ui_controls_linux.cc4
-rw-r--r--chrome/browser/automation/ui_controls_mac.mm32
-rw-r--r--chrome/browser/automation/ui_controls_win.cc30
-rw-r--r--chrome/browser/browser_focus_uitest.cc28
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc76
-rw-r--r--chrome/browser/chromeos/login/captcha_view.cc2
-rw-r--r--chrome/browser/chromeos/login/existing_user_view.cc12
-rw-r--r--chrome/browser/chromeos/login/guest_user_view.cc10
-rw-r--r--chrome/browser/chromeos/login/new_user_view.cc12
-rw-r--r--chrome/browser/chromeos/login/password_changed_view.cc2
-rw-r--r--chrome/browser/chromeos/login/screen_lock_view.cc2
-rw-r--r--chrome/browser/chromeos/login/screen_locker.cc4
-rw-r--r--chrome/browser/chromeos/login/screen_locker_browsertest.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_accessibility_helper.cc2
-rw-r--r--chrome/browser/chromeos/login/wizard_accessibility_helper.h2
-rw-r--r--chrome/browser/chromeos/login/wizard_controller.cc18
-rw-r--r--chrome/browser/chromeos/login/wizard_controller_browsertest.cc10
-rw-r--r--chrome/browser/chromeos/options/wifi_config_view.cc2
-rw-r--r--chrome/browser/extensions/extension_host.cc6
-rw-r--r--chrome/browser/extensions/extension_input_api.cc6
-rw-r--r--chrome/browser/external_tab_container_win.cc2
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc2
-rw-r--r--chrome/browser/instant/instant_browsertest.cc8
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_unittest.cc4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc2
-rw-r--r--chrome/browser/ui/cocoa/html_dialog_window_controller.mm6
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc4
-rw-r--r--chrome/browser/ui/views/accelerator_table_gtk.cc204
-rw-r--r--chrome/browser/ui/views/accelerator_table_gtk.h4
-rw-r--r--chrome/browser/ui/views/accessible_pane_view.cc20
-rw-r--r--chrome/browser/ui/views/bookmark_bar_view_test.cc22
-rw-r--r--chrome/browser/ui/views/bookmark_bubble_view.cc6
-rw-r--r--chrome/browser/ui/views/browser_keyboard_accessibility_test_win.cc8
-rw-r--r--chrome/browser/ui/views/download_item_view.cc4
-rw-r--r--chrome/browser/ui/views/dropdown_bar_host.cc6
-rw-r--r--chrome/browser/ui/views/dropdown_bar_host_gtk.cc2
-rw-r--r--chrome/browser/ui/views/dropdown_bar_host_win.cc2
-rw-r--r--chrome/browser/ui/views/extensions/extension_view.cc2
-rw-r--r--chrome/browser/ui/views/find_bar_host.cc24
-rw-r--r--chrome/browser/ui/views/find_bar_host_interactive_uitest.cc14
-rw-r--r--chrome/browser/ui/views/find_bar_view.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc56
-rw-r--r--chrome/browser/ui/views/fullscreen_exit_bubble.cc4
-rw-r--r--chrome/browser/ui/views/html_dialog_view.cc6
-rw-r--r--chrome/browser/ui/views/info_bubble.cc6
-rw-r--r--chrome/browser/ui/views/js_modal_dialog_views.cc4
-rw-r--r--chrome/browser/ui/views/keyword_editor_view.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/page_action_image_view.cc4
-rw-r--r--chrome/browser/ui/views/location_bar/star_view.cc4
-rw-r--r--chrome/browser/ui/views/options/cookies_view.cc8
-rw-r--r--chrome/browser/ui/views/options/cookies_view.h2
-rw-r--r--chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc14
-rw-r--r--chrome/browser/ui/views/task_manager_view.cc8
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc6
-rw-r--r--chrome/browser/ui/views/unhandled_keyboard_event_handler.cc2
-rw-r--r--chrome/browser/ui/views/url_picker.cc4
-rw-r--r--chrome/common/automation_messages_internal.h2
-rw-r--r--chrome/renderer/autofill_helper.cc6
-rw-r--r--chrome/renderer/password_autocomplete_manager.cc4
-rw-r--r--chrome/renderer/password_autocomplete_manager_unittest.cc8
-rw-r--r--chrome/renderer/render_view_browsertest.cc50
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.cc20
-rw-r--r--chrome/test/automated_ui_tests/automated_ui_tests.h4
-rw-r--r--chrome/test/automation/window_proxy.cc2
-rw-r--r--chrome/test/automation/window_proxy.h4
-rw-r--r--chrome/test/interactive_ui/keyboard_access_uitest.cc20
-rw-r--r--chrome/test/interactive_ui/npapi_interactive_test.cc37
-rw-r--r--chrome/test/reliability/page_load_test.cc6
-rw-r--r--chrome/test/render_view_test.cc2
-rw-r--r--chrome/test/ui_test_utils.cc4
-rw-r--r--chrome/test/ui_test_utils.h10
-rw-r--r--chrome/test/webdriver/keymap.cc184
-rw-r--r--chrome/test/webdriver/keymap.h10
80 files changed, 632 insertions, 657 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
index 7577b72..0b8dfcc 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc
@@ -4,7 +4,6 @@
#include <stdio.h>
-#include "app/keyboard_codes.h"
#include "base/message_loop.h"
#include "base/string16.h"
#include "base/string_util.h"
@@ -31,6 +30,7 @@
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "net/base/mock_host_resolver.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/event.h"
#if defined(OS_LINUX)
@@ -45,24 +45,24 @@ namespace {
const char kSearchKeyword[] = "foo";
const wchar_t kSearchKeywordKeys[] = {
- app::VKEY_F, app::VKEY_O, app::VKEY_O, 0
+ ui::VKEY_F, ui::VKEY_O, ui::VKEY_O, 0
};
const char kSearchURL[] = "http://www.foo.com/search?q={searchTerms}";
const char kSearchShortName[] = "foo";
const char kSearchText[] = "abc";
const wchar_t kSearchTextKeys[] = {
- app::VKEY_A, app::VKEY_B, app::VKEY_C, 0
+ ui::VKEY_A, ui::VKEY_B, ui::VKEY_C, 0
};
const char kSearchTextURL[] = "http://www.foo.com/search?q=abc";
const char kSearchSingleChar[] = "z";
-const wchar_t kSearchSingleCharKeys[] = { app::VKEY_Z, 0 };
+const wchar_t kSearchSingleCharKeys[] = { ui::VKEY_Z, 0 };
const char kSearchSingleCharURL[] = "http://www.foo.com/search?q=z";
const char kHistoryPageURL[] = "chrome://history/#q=abc";
const char kDesiredTLDHostname[] = "www.bar.com";
const wchar_t kDesiredTLDKeys[] = {
- app::VKEY_B, app::VKEY_A, app::VKEY_R, 0
+ ui::VKEY_B, ui::VKEY_A, ui::VKEY_R, 0
};
// Hostnames that shall be blocked by host resolver.
@@ -145,7 +145,7 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
}
static void SendKeyForBrowser(const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt) {
@@ -153,13 +153,13 @@ class AutocompleteEditViewTest : public InProcessBrowserTest,
browser, key, control, shift, alt, false /* command */));
}
- void SendKey(app::KeyboardCode key, bool control, bool shift, bool alt) {
+ void SendKey(ui::KeyboardCode key, bool control, bool shift, bool alt) {
SendKeyForBrowser(browser(), key, control, shift, alt);
}
void SendKeySequence(const wchar_t* keys) {
for (; *keys; ++keys)
- ASSERT_NO_FATAL_FAILURE(SendKey(static_cast<app::KeyboardCode>(*keys),
+ ASSERT_NO_FATAL_FAILURE(SendKey(static_cast<ui::KeyboardCode>(*keys),
false, false, false));
}
@@ -320,43 +320,43 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, FLAKY_BrowserAccelerators) {
ASSERT_NO_FATAL_FAILURE(WaitForTabOpenOrClose(tab_count + 1));
// Select the first Tab.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_1, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_1, true, false, false));
ASSERT_EQ(0, browser()->selected_index());
browser()->FocusLocationBar();
// Select the second Tab.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_2, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_2, true, false, false));
ASSERT_EQ(1, browser()->selected_index());
browser()->FocusLocationBar();
// Try ctrl-w to close a Tab.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_W, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_W, true, false, false));
ASSERT_NO_FATAL_FAILURE(WaitForTabOpenOrClose(tab_count));
// Try ctrl-l to focus location bar.
edit_view->SetUserText(L"Hello world");
EXPECT_FALSE(edit_view->IsSelectAll());
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_L, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_L, true, false, false));
EXPECT_TRUE(edit_view->IsSelectAll());
// Try editing the location bar text.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RIGHT, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RIGHT, false, false, false));
EXPECT_FALSE(edit_view->IsSelectAll());
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_S, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_S, false, false, false));
EXPECT_EQ(L"Hello worlds", edit_view->GetText());
// Try ctrl-x to cut text.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_LEFT, true, true, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_LEFT, true, true, false));
EXPECT_FALSE(edit_view->IsSelectAll());
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_X, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_X, true, false, false));
EXPECT_EQ(L"Hello ", edit_view->GetText());
#if !defined(OS_CHROMEOS)
// Try alt-f4 to close the browser.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_F4, false, false, true, false,
+ browser(), ui::VKEY_F4, false, false, true, false,
NotificationType::BROWSER_CLOSED, Source<Browser>(browser())));
#endif
}
@@ -373,7 +373,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, PopupAccelerators) {
// Try ctrl-w to close the popup.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- popup, app::VKEY_W, true, false, false, false,
+ popup, ui::VKEY_W, true, false, false, false,
NotificationType::BROWSER_CLOSED, Source<Browser>(popup)));
// Create another popup.
@@ -387,25 +387,25 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, PopupAccelerators) {
EXPECT_TRUE(edit_view->IsSelectAll());
// Try editing the location bar text -- should be disallowed.
- ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, app::VKEY_RIGHT, false,
+ ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, ui::VKEY_RIGHT, false,
false, false));
EXPECT_FALSE(edit_view->IsSelectAll());
- ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, app::VKEY_S, false, false,
+ ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, ui::VKEY_S, false, false,
false));
EXPECT_EQ(L"Hello world", edit_view->GetText());
// Try ctrl-x to cut text -- should be disallowed.
- ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, app::VKEY_LEFT, true, true,
+ ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, ui::VKEY_LEFT, true, true,
false));
EXPECT_FALSE(edit_view->IsSelectAll());
- ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, app::VKEY_X, true, false,
+ ASSERT_NO_FATAL_FAILURE(SendKeyForBrowser(popup, ui::VKEY_X, true, false,
false));
EXPECT_EQ(L"Hello world", edit_view->GetText());
#if !defined(OS_CHROMEOS)
// Try alt-f4 to close the popup.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- popup, app::VKEY_F4, false, false, true, false,
+ popup, ui::VKEY_F4, false, false, true, false,
NotificationType::BROWSER_CLOSED, Source<Browser>(popup)));
#endif
}
@@ -425,17 +425,17 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BackspaceInKeywordMode) {
ASSERT_EQ(kSearchKeyword, WideToUTF8(edit_view->model()->keyword()));
// Trigger keyword mode.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_TAB, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_TAB, false, false, false));
ASSERT_FALSE(edit_view->model()->is_keyword_hint());
ASSERT_EQ(kSearchKeyword, WideToUTF8(edit_view->model()->keyword()));
// Backspace without search text should bring back keyword hint mode.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
ASSERT_TRUE(edit_view->model()->is_keyword_hint());
ASSERT_EQ(kSearchKeyword, WideToUTF8(edit_view->model()->keyword()));
// Trigger keyword mode again.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_TAB, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_TAB, false, false, false));
ASSERT_FALSE(edit_view->model()->is_keyword_hint());
ASSERT_EQ(kSearchKeyword, WideToUTF8(edit_view->model()->keyword()));
@@ -445,7 +445,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BackspaceInKeywordMode) {
// Should stay in keyword mode while deleting search text by pressing
// backspace.
for (size_t i = 0; i < arraysize(kSearchText) - 1; ++i) {
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
ASSERT_FALSE(edit_view->model()->is_keyword_hint());
ASSERT_EQ(kSearchKeyword, WideToUTF8(edit_view->model()->keyword()));
}
@@ -454,10 +454,10 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BackspaceInKeywordMode) {
ASSERT_NO_FATAL_FAILURE(SendKeySequence(kSearchTextKeys));
// Move cursor to the beginning of the search text.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_HOME, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_HOME, false, false, false));
// Backspace at the beginning of the search text shall turn off
// the keyword mode.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
ASSERT_FALSE(edit_view->model()->is_keyword_hint());
ASSERT_EQ(std::string(), WideToUTF8(edit_view->model()->keyword()));
ASSERT_EQ(std::string(kSearchKeyword) + kSearchText,
@@ -479,11 +479,11 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, Escape) {
EXPECT_TRUE(edit_view->IsSelectAll());
// Delete all text in omnibox.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
EXPECT_TRUE(edit_view->GetText().empty());
// Escape shall revert the text in omnibox.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_ESCAPE, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, false, false, false));
EXPECT_EQ(old_text, edit_view->GetText());
EXPECT_TRUE(edit_view->IsSelectAll());
}
@@ -504,7 +504,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, DesiredTLD) {
ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone());
ASSERT_TRUE(popup_model->IsOpen());
// ctrl-Enter triggers desired_tld feature, thus www.bar.com shall be opened.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN, true, false, false));
GURL url = browser()->GetSelectedTabContents()->GetURL();
EXPECT_STREQ(kDesiredTLDHostname, url.host().c_str());
@@ -522,7 +522,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, AltEnter) {
edit_view->SetUserText(ASCIIToWide(chrome::kChromeUIHistoryURL));
int tab_count = browser()->tab_count();
// alt-Enter opens a new tab.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN, false, false, true));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN, false, false, true));
ASSERT_NO_FATAL_FAILURE(WaitForTabOpenOrClose(tab_count + 1));
}
@@ -548,7 +548,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToSearch) {
popup_model->result().default_match()->type);
// Open the default match.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN, false, false, false));
GURL url = browser()->GetSelectedTabContents()->GetURL();
EXPECT_STREQ(kSearchTextURL, url.spec().c_str());
@@ -565,7 +565,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToSearch) {
popup_model->result().default_match()->type);
// Open the default match.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN, false, false, false));
url = browser()->GetSelectedTabContents()->GetURL();
EXPECT_STREQ(kSearchSingleCharURL, url.spec().c_str());
}
@@ -595,7 +595,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToOpenHistoryPage) {
AutocompleteMatch::OPEN_HISTORY_PAGE)
break;
size_t old_selected_line = popup_model->selected_line();
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_DOWN, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_DOWN, false, false, false));
ASSERT_EQ(old_selected_line + 1, popup_model->selected_line());
if (popup_model->selected_line() == size - 1)
break;
@@ -606,7 +606,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EnterToOpenHistoryPage) {
popup_model->result().match_at(popup_model->selected_line()).type);
// Open the history page item.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN, false, false, false));
GURL url = browser()->GetSelectedTabContents()->GetURL();
EXPECT_STREQ(kHistoryPageURL, url.spec().c_str());
}
@@ -638,7 +638,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EscapeToDefaultMatch) {
// Move to another line with different text.
size_t size = popup_model->result().size();
while (popup_model->selected_line() < size - 1) {
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_DOWN, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_DOWN, false, false, false));
ASSERT_NE(old_selected_line, popup_model->selected_line());
if (old_text != edit_view->GetText())
break;
@@ -647,7 +647,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, EscapeToDefaultMatch) {
EXPECT_NE(old_text, edit_view->GetText());
// Escape shall revert back to the default match item.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_ESCAPE, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_ESCAPE, false, false, false));
EXPECT_EQ(old_text, edit_view->GetText());
EXPECT_EQ(old_selected_line, popup_model->selected_line());
}
@@ -672,7 +672,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BasicTextOperations) {
EXPECT_EQ(old_text.size(), end);
// Move the cursor to the end.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_END, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, false, false, false));
EXPECT_FALSE(edit_view->IsSelectAll());
// Make sure the cursor is placed correctly.
@@ -682,12 +682,12 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BasicTextOperations) {
// Insert one character at the end. Make sure we won't insert anything after
// the special ZWS mark used in gtk implementation.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_A, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_A, false, false, false));
EXPECT_EQ(old_text + L"a", edit_view->GetText());
// Delete one character from the end. Make sure we won't delete the special
// ZWS mark used in gtk implementation.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
EXPECT_EQ(old_text, edit_view->GetText());
edit_view->SelectAll(true);
@@ -697,7 +697,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, BasicTextOperations) {
EXPECT_EQ(old_text.size(), end);
// Delete the content
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_DELETE, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_DELETE, false, false, false));
EXPECT_TRUE(edit_view->IsSelectAll());
edit_view->GetSelectionBounds(&start, &end);
EXPECT_EQ(0U, start);
@@ -729,15 +729,15 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, UndoRedoLinux) {
EXPECT_TRUE(edit_view->IsSelectAll());
// Undo should clear the omnibox.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_TRUE(edit_view->GetText().empty());
// Nothing should happen if undo again.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_TRUE(edit_view->GetText().empty());
// Redo should restore the original text.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, true, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, true, false));
EXPECT_EQ(old_text, edit_view->GetText());
// Looks like the undo manager doesn't support restoring selection.
@@ -750,33 +750,33 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, UndoRedoLinux) {
EXPECT_EQ(old_text.size(), end);
// Delete two characters.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
EXPECT_EQ(old_text.substr(0, old_text.size() - 2), edit_view->GetText());
// Undo delete.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_EQ(old_text, edit_view->GetText());
// Redo delete.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, true, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, true, false));
EXPECT_EQ(old_text.substr(0, old_text.size() - 2), edit_view->GetText());
// Delete everything.
edit_view->SelectAll(true);
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
EXPECT_TRUE(edit_view->GetText().empty());
// Undo delete everything.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_EQ(old_text.substr(0, old_text.size() - 2), edit_view->GetText());
// Undo delete two characters.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_EQ(old_text, edit_view->GetText());
// Undo again.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_Z, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_Z, true, false, false));
EXPECT_TRUE(edit_view->GetText().empty());
}
@@ -791,17 +791,17 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, PrimarySelection) {
EXPECT_FALSE(edit_view->IsSelectAll());
// Move the cursor to the end.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_END, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, false, false, false));
// Select all text by pressing Shift+Home
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_HOME, false, true, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_HOME, false, true, false));
EXPECT_TRUE(edit_view->IsSelectAll());
// The selected content should be saved to the PRIMARY clipboard.
EXPECT_EQ("Hello world", GetPrimarySelectionText());
// Move the cursor to the end.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_END, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, false, false, false));
EXPECT_FALSE(edit_view->IsSelectAll());
// The content in the PRIMARY clipboard should not be cleared.
@@ -820,10 +820,10 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest,
edit_view->SetUserText(UTF8ToWide("\357\276\200\357\276\236"));
// Move the cursor to the end.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_END, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_END, false, false, false));
// Backspace should delete one character.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_BACK, false, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_BACK, false, false, false));
EXPECT_EQ(UTF8ToWide("\357\276\200"), edit_view->GetText());
}
@@ -842,7 +842,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteEditViewTest, PasteReplacingAll) {
SetClipboardText(kSearchText);
// Paste text.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_V, true, false, false));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_V, true, false, false));
ASSERT_NO_FATAL_FAILURE(WaitForAutocompleteControllerDone());
ASSERT_TRUE(popup_model->IsOpen());
diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
index fb8e740..7b9354d 100644
--- a/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
+++ b/chrome/browser/autocomplete/autocomplete_edit_view_win.cc
@@ -11,7 +11,6 @@
#include <richedit.h>
#include <textserv.h>
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/l10n_util_win.h"
#include "app/win/drag_source.h"
@@ -50,6 +49,7 @@
#include "ui/base/clipboard/scoped_clipboard_writer.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/drag_utils.h"
#include "views/focus/focus_util_win.h"
#include "views/widget/widget.h"
@@ -957,10 +957,10 @@ void AutocompleteEditViewWin::PasteAndGo(const std::wstring& text) {
bool AutocompleteEditViewWin::SkipDefaultKeyEventProcessing(
const views::KeyEvent& e) {
- app::KeyboardCode key = e.GetKeyCode();
+ ui::KeyboardCode key = e.GetKeyCode();
// We don't process ALT + numpad digit as accelerators, they are used for
// entering special characters. We do translate alt-home.
- if (e.IsAltDown() && (key != app::VKEY_HOME) &&
+ if (e.IsAltDown() && (key != ui::VKEY_HOME) &&
app::win::IsNumPadDigit(key, e.IsExtendedKey()))
return true;
@@ -972,28 +972,28 @@ bool AutocompleteEditViewWin::SkipDefaultKeyEventProcessing(
// accelerators (e.g., F5 for reload the page should work even when the
// Omnibox gets focused).
switch (key) {
- case app::VKEY_ESCAPE: {
+ case ui::VKEY_ESCAPE: {
ScopedFreeze freeze(this, GetTextObjectModel());
return model_->OnEscapeKeyPressed();
}
- case app::VKEY_RETURN:
+ case ui::VKEY_RETURN:
return true;
- case app::VKEY_UP:
- case app::VKEY_DOWN:
+ case ui::VKEY_UP:
+ case ui::VKEY_DOWN:
return !e.IsAltDown();
- case app::VKEY_DELETE:
- case app::VKEY_INSERT:
+ case ui::VKEY_DELETE:
+ case ui::VKEY_INSERT:
return !e.IsAltDown() && e.IsShiftDown() && !e.IsControlDown();
- case app::VKEY_X:
- case app::VKEY_V:
+ case ui::VKEY_X:
+ case ui::VKEY_V:
return !e.IsAltDown() && e.IsControlDown();
- case app::VKEY_BACK:
- case app::VKEY_OEM_PLUS:
+ case ui::VKEY_BACK:
+ case ui::VKEY_OEM_PLUS:
return true;
default:
@@ -1795,7 +1795,7 @@ void AutocompleteEditViewWin::HandleKeystroke(UINT message,
ScopedFreeze freeze(this, GetTextObjectModel());
OnBeforePossibleChange();
- if (key == app::VKEY_HOME || key == app::VKEY_END) {
+ if (key == ui::VKEY_HOME || key == ui::VKEY_END) {
// DefWindowProc() might reset the keyboard layout when it receives a
// keydown event for VKEY_HOME or VKEY_END. When the window was created
// with WS_EX_LAYOUTRTL and the current keyboard layout is not a RTL one,
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index baf2843..799c28c 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -5,7 +5,6 @@
#include <string>
#include "base/utf_string_conversions.h"
-#include "app/keyboard_code_conversion.h"
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "base/scoped_ptr.h"
@@ -28,6 +27,7 @@
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/keycodes/keyboard_code_conversion.h"
static const char* kTestFormString =
"<form action=\"http://www.google.com/\" method=\"POST\">"
@@ -157,14 +157,14 @@ class AutoFillTest : public InProcessBrowserTest {
// Start filling the first name field with "M" and wait for the popup to be
// shown.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_M, false, true, false, false,
+ browser(), ui::VKEY_M, false, true, false, false,
NotificationType::AUTOFILL_DID_SHOW_SUGGESTIONS,
Source<RenderViewHost>(rvh())));
// Press the down arrow to select the suggestion and preview the autofilled
// form.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_DOWN, false, false, false, false,
+ browser(), ui::VKEY_DOWN, false, false, false, false,
NotificationType::AUTOFILL_DID_FILL_FORM_DATA,
Source<RenderViewHost>(rvh())));
@@ -183,7 +183,7 @@ class AutoFillTest : public InProcessBrowserTest {
// Press Enter to accept the autofill suggestions.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_RETURN, false, false, false, false,
+ browser(), ui::VKEY_RETURN, false, false, false, false,
NotificationType::AUTOFILL_DID_FILL_FORM_DATA,
Source<RenderViewHost>(rvh())));
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index a2d142a..5646c75 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/automation/automation_provider.h"
-#include "app/keyboard_codes.h"
#include "base/debug/trace_event.h"
#include "base/json/json_reader.h"
#include "base/utf_string_conversions.h"
@@ -24,6 +23,7 @@
#include "chrome/browser/ui/views/bookmark_bar_view.h"
#include "chrome/common/automation_messages.h"
#include "chrome/common/page_zoom.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/focus/accelerator_handler.h"
#include "views/widget/root_view.h"
#include "views/widget/widget_win.h"
@@ -203,7 +203,7 @@ void AutomationProvider::WindowSimulateDrag(int handle,
// Press Escape, making sure we wait until chrome processes the escape.
// TODO(phajdan.jr): make this use ui_test_utils::SendKeyPressSync.
ui_controls::SendKeyPressNotifyWhenDone(
- window, app::VKEY_ESCAPE,
+ window, ui::VKEY_ESCAPE,
((flags & views::Event::EF_CONTROL_DOWN) ==
views::Event::EF_CONTROL_DOWN),
((flags & views::Event::EF_SHIFT_DOWN) ==
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 9b6c303..9012d3c 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -869,7 +869,7 @@ void TestingAutomationProvider::WindowSimulateKeyPress(
gfx::NativeWindow window = window_tracker_->GetResource(handle);
// The key event is sent to whatever window is active.
- ui_controls::SendKeyPress(window, static_cast<app::KeyboardCode>(key),
+ ui_controls::SendKeyPress(window, static_cast<ui::KeyboardCode>(key),
((flags & views::Event::EF_CONTROL_DOWN) ==
views::Event::EF_CONTROL_DOWN),
((flags & views::Event::EF_SHIFT_DOWN) ==
diff --git a/chrome/browser/automation/ui_controls.h b/chrome/browser/automation/ui_controls.h
index 3664567..25fa4f6 100644
--- a/chrome/browser/automation/ui_controls.h
+++ b/chrome/browser/automation/ui_controls.h
@@ -12,9 +12,9 @@
#include <wtypes.h>
#endif
-#include "app/keyboard_codes.h"
#include "gfx/native_widget_types.h"
#include "gfx/point.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#if defined(TOOLKIT_VIEWS)
namespace views {
@@ -46,13 +46,13 @@ namespace ui_controls {
// If you're writing a test chances are you want the variant in ui_test_utils.
// See it for details.
bool SendKeyPress(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
bool command);
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
diff --git a/chrome/browser/automation/ui_controls_linux.cc b/chrome/browser/automation/ui_controls_linux.cc
index 21cd0dd..1b814e5 100644
--- a/chrome/browser/automation/ui_controls_linux.cc
+++ b/chrome/browser/automation/ui_controls_linux.cc
@@ -96,7 +96,7 @@ void FakeAMouseMotionEvent(gint x, gint y) {
namespace ui_controls {
bool SendKeyPress(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control, bool shift, bool alt, bool command) {
DCHECK(command == false); // No command key on Linux
GdkWindow* event_window = NULL;
@@ -137,7 +137,7 @@ bool SendKeyPress(gfx::NativeWindow window,
}
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control, bool shift,
bool alt, bool command,
Task* task) {
diff --git a/chrome/browser/automation/ui_controls_mac.mm b/chrome/browser/automation/ui_controls_mac.mm
index 03f7e2c..6e8bcc9 100644
--- a/chrome/browser/automation/ui_controls_mac.mm
+++ b/chrome/browser/automation/ui_controls_mac.mm
@@ -8,10 +8,10 @@
#include <mach/mach_time.h>
#include <vector>
-#include "app/keyboard_code_conversion_mac.h"
#include "base/message_loop.h"
#include "chrome/browser/automation/ui_controls_internal.h"
#include "chrome/browser/browser_thread.h"
+#include "ui/base/keycodes/keyboard_code_conversion_mac.h"
// Implementation details: We use [NSApplication sendEvent:] instead
// of [NSApplication postEvent:atStart:] so that the event gets sent
@@ -76,11 +76,11 @@ NSTimeInterval TimeIntervalSinceSystemStartup() {
// Creates and returns an autoreleased key event.
NSEvent* SynthesizeKeyEvent(NSWindow* window,
bool keyDown,
- app::KeyboardCode keycode,
+ ui::KeyboardCode keycode,
NSUInteger flags) {
unichar character;
unichar characterIgnoringModifiers;
- int macKeycode = app::MacKeyCodeForWindowsKeyCode(
+ int macKeycode = ui::MacKeyCodeForWindowsKeyCode(
keycode, flags, &character, &characterIgnoringModifiers);
if (macKeycode < 0)
@@ -97,8 +97,8 @@ NSEvent* SynthesizeKeyEvent(NSWindow* window,
// Modifier keys generate NSFlagsChanged event rather than
// NSKeyDown/NSKeyUp events.
- if (keycode == app::VKEY_CONTROL || keycode == app::VKEY_SHIFT ||
- keycode == app::VKEY_MENU || keycode == app::VKEY_COMMAND)
+ if (keycode == ui::VKEY_CONTROL || keycode == ui::VKEY_SHIFT ||
+ keycode == ui::VKEY_MENU || keycode == ui::VKEY_COMMAND)
type = NSFlagsChanged;
// For events other than mouse moved, [event locationInWindow] is
@@ -121,7 +121,7 @@ NSEvent* SynthesizeKeyEvent(NSWindow* window,
// Creates the proper sequence of autoreleased key events for a key down + up.
void SynthesizeKeyEventsSequence(NSWindow* window,
- app::KeyboardCode keycode,
+ ui::KeyboardCode keycode,
bool control,
bool shift,
bool alt,
@@ -131,25 +131,25 @@ void SynthesizeKeyEventsSequence(NSWindow* window,
NSUInteger flags = 0;
if (control) {
flags |= NSControlKeyMask;
- event = SynthesizeKeyEvent(window, true, app::VKEY_CONTROL, flags);
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_CONTROL, flags);
DCHECK(event);
events->push_back(event);
}
if (shift) {
flags |= NSShiftKeyMask;
- event = SynthesizeKeyEvent(window, true, app::VKEY_SHIFT, flags);
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_SHIFT, flags);
DCHECK(event);
events->push_back(event);
}
if (alt) {
flags |= NSAlternateKeyMask;
- event = SynthesizeKeyEvent(window, true, app::VKEY_MENU, flags);
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_MENU, flags);
DCHECK(event);
events->push_back(event);
}
if (command) {
flags |= NSCommandKeyMask;
- event = SynthesizeKeyEvent(window, true, app::VKEY_COMMAND, flags);
+ event = SynthesizeKeyEvent(window, true, ui::VKEY_COMMAND, flags);
DCHECK(event);
events->push_back(event);
}
@@ -163,25 +163,25 @@ void SynthesizeKeyEventsSequence(NSWindow* window,
if (command) {
flags &= ~NSCommandKeyMask;
- event = SynthesizeKeyEvent(window, false, app::VKEY_COMMAND, flags);
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_COMMAND, flags);
DCHECK(event);
events->push_back(event);
}
if (alt) {
flags &= ~NSAlternateKeyMask;
- event = SynthesizeKeyEvent(window, false, app::VKEY_MENU, flags);
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_MENU, flags);
DCHECK(event);
events->push_back(event);
}
if (shift) {
flags &= ~NSShiftKeyMask;
- event = SynthesizeKeyEvent(window, false, app::VKEY_SHIFT, flags);
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_SHIFT, flags);
DCHECK(event);
events->push_back(event);
}
if (control) {
flags &= ~NSControlKeyMask;
- event = SynthesizeKeyEvent(window, false, app::VKEY_CONTROL, flags);
+ event = SynthesizeKeyEvent(window, false, ui::VKEY_CONTROL, flags);
DCHECK(event);
events->push_back(event);
}
@@ -221,7 +221,7 @@ NSPoint g_mouse_location = { 0, 0 };
namespace ui_controls {
bool SendKeyPress(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
@@ -234,7 +234,7 @@ bool SendKeyPress(gfx::NativeWindow window,
// Win and Linux implement a SendKeyPress() this as a
// SendKeyPressAndRelease(), so we should as well (despite the name).
bool SendKeyPressNotifyWhenDone(gfx::NativeWindow window,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
diff --git a/chrome/browser/automation/ui_controls_win.cc b/chrome/browser/automation/ui_controls_win.cc
index b03c97b..127ea6d 100644
--- a/chrome/browser/automation/ui_controls_win.cc
+++ b/chrome/browser/automation/ui_controls_win.cc
@@ -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 @@ void InputDispatcher::NotifyTask() {
// 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 @@ bool FillKeyboardInput(app::KeyboardCode key, INPUT* input, bool key_up) {
}
// 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 @@ bool SendKeyEvent(app::KeyboardCode key, bool up) {
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 @@ bool SendKeyPressImpl(app::KeyboardCode key,
// 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 @@ bool SendKeyPressImpl(app::KeyboardCode key,
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 @@ bool SendKeyPressImpl(app::KeyboardCode key,
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 @@ bool SendMouseEventsImpl(MouseButton type, int state, Task* task) {
// 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) {
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index abf7614..2396dc6 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -313,7 +313,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
ASSERT_TRUE(IsViewFocused(vid));
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_TAB, true, false, false, false));
+ browser(), ui::VKEY_TAB, true, false, false, false));
}
// As above, but with ctrl+shift+tab.
@@ -324,7 +324,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocus) {
ASSERT_TRUE(IsViewFocused(vid));
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_TAB, true, true, false, false));
+ browser(), ui::VKEY_TAB, true, true, false, false));
}
}
}
@@ -485,7 +485,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
Details<bool> details(&is_editable_node);
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
- browser(), app::VKEY_TAB, false, false, false, false,
+ browser(), ui::VKEY_TAB, false, false, false, false,
NotificationType::FOCUS_CHANGED_IN_PAGE,
NotificationSource(Source<RenderViewHost>(
browser()->GetSelectedTabContents()->render_view_host())),
@@ -493,7 +493,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
} else {
// On the last tab key press, the focus returns to the browser.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_TAB, false, false, false, false,
+ browser(), ui::VKEY_TAB, false, false, false, false,
NotificationType::FOCUS_RETURNED_TO_BROWSER,
NotificationSource(Source<Browser>(browser()))));
}
@@ -524,7 +524,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
Details<bool> details(&is_editable_node);
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWaitWithDetails(
- browser(), app::VKEY_TAB, false, true, false, false,
+ browser(), ui::VKEY_TAB, false, true, false, false,
NotificationType::FOCUS_CHANGED_IN_PAGE,
NotificationSource(Source<RenderViewHost>(
browser()->GetSelectedTabContents()->render_view_host())),
@@ -532,7 +532,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversal) {
} else {
// On the last tab key press, the focus returns to the browser.
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_TAB, false, true, false, false,
+ browser(), ui::VKEY_TAB, false, true, false, false,
NotificationType::FOCUS_RETURNED_TO_BROWSER,
NotificationSource(Source<Browser>(browser()))));
}
@@ -615,7 +615,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
}
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_TAB, false, false, false, false,
+ browser(), ui::VKEY_TAB, false, false, false, false,
notification_type, notification_source));
}
@@ -646,7 +646,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, MAYBE_FocusTraversalOnInterstitial) {
}
ASSERT_TRUE(ui_test_utils::SendKeyPressAndWait(
- browser(), app::VKEY_TAB, false, true, false, false,
+ browser(), ui::VKEY_TAB, false, true, false, false,
notification_type, notification_source));
// Let's make sure the focus is on the expected element in the page.
@@ -715,11 +715,11 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
#if defined(OS_MACOSX)
// Press Cmd+F, which will make the Find box open and request focus.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, false, false, false, true));
+ browser(), ui::VKEY_F, false, false, false, true));
#else
// Press Ctrl+F, which will make the Find box open and request focus.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, true, false, false, false));
+ browser(), ui::VKEY_F, true, false, false, false));
#endif
// Ideally, we wouldn't sleep here and instead would intercept the
@@ -739,10 +739,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
// Now press Ctrl+F again and focus should move to the Find box.
#if defined(OS_MACOSX)
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, false, false, false, true));
+ browser(), ui::VKEY_F, false, false, false, true));
#else
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, true, false, false, false));
+ browser(), ui::VKEY_F, true, false, false, false));
#endif
ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
@@ -753,10 +753,10 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FindFocusTest) {
// Now press Ctrl+F again and focus should move to the Find box.
#if defined(OS_MACOSX)
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, false, false, false, true));
+ browser(), ui::VKEY_F, false, false, false, true));
#else
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F, true, false, false, false));
+ browser(), ui::VKEY_F, true, false, false, false));
#endif
// See remark above on why we wait.
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index 5b8ecd7..dd025b6 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -4,7 +4,6 @@
#include "build/build_config.h"
-#include "app/keyboard_codes.h"
#include "base/basictypes.h"
#include "base/logging.h"
#include "base/message_loop.h"
@@ -23,6 +22,7 @@
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "net/test/test_server.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace {
@@ -61,7 +61,7 @@ const size_t kMaxResultLength = 10;
// input.
// Please refer to chrome/test/data/keyevents_test.html for details.
struct KeyEventTestData {
- app::KeyboardCode key;
+ ui::KeyboardCode key;
bool ctrl;
bool shift;
bool alt;
@@ -289,13 +289,13 @@ class BrowserKeyEventsTest : public InProcessBrowserTest {
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
static const KeyEventTestData kTestNoInput[] = {
// a
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
false, false, false, false, 3,
{ "D 65 0 false false false false",
"P 97 97 false false false false",
"U 65 0 false false false false" } },
// shift-a
- { app::VKEY_A, false, true, false, false,
+ { ui::VKEY_A, false, true, false, false,
false, false, false, false, 5,
{ "D 16 0 false true false false",
"D 65 0 false true false false",
@@ -303,7 +303,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
"U 65 0 false true false false",
"U 16 0 false true false false" } },
// a, suppress keydown
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
true, false, false, false, 2,
{ "D 65 0 false false false false",
"U 65 0 false false false false" } },
@@ -311,14 +311,14 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
static const KeyEventTestData kTestWithInput[] = {
// a
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
false, false, false, false, 4,
{ "D 65 0 false false false false",
"P 97 97 false false false false",
"T a",
"U 65 0 false false false false" } },
// shift-a
- { app::VKEY_A, false, true, false, false,
+ { ui::VKEY_A, false, true, false, false,
false, false, false, false, 6,
{ "D 16 0 false true false false",
"D 65 0 false true false false",
@@ -327,18 +327,18 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
"U 65 0 false true false false",
"U 16 0 false true false false" } },
// a, suppress keydown
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
true, false, false, false, 2,
{ "D 65 0 false false false false",
"U 65 0 false false false false" } },
// a, suppress keypress
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
false, true, false, false, 3,
{ "D 65 0 false false false false",
"P 97 97 false false false false",
"U 65 0 false false false false" } },
// a, suppress textInput
- { app::VKEY_A, false, false, false, false,
+ { ui::VKEY_A, false, false, false, false,
false, false, false, true, 4,
{ "D 65 0 false false false false",
"P 97 97 false false false false",
@@ -384,14 +384,14 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, NormalKeyEvents) {
#if defined(OS_WIN) || defined(OS_LINUX)
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
static const KeyEventTestData kTestCtrlF = {
- app::VKEY_F, true, false, false, false,
+ ui::VKEY_F, true, false, false, false,
false, false, false, false, 2,
{ "D 17 0 true false false false",
"D 70 0 true false false false" }
};
static const KeyEventTestData kTestCtrlFSuppressKeyDown = {
- app::VKEY_F, true, false, false, false,
+ ui::VKEY_F, true, false, false, false,
true, false, false, false, 4,
{ "D 17 0 true false false false",
"D 70 0 true false false false",
@@ -402,7 +402,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
// Ctrl+Z doesn't bind to any accelerators, which then should generate a
// keypress event with charCode=26.
static const KeyEventTestData kTestCtrlZ = {
- app::VKEY_Z, true, false, false, false,
+ ui::VKEY_Z, true, false, false, false,
false, false, false, false, 5,
{ "D 17 0 true false false false",
"D 90 0 true false false false",
@@ -412,7 +412,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
};
static const KeyEventTestData kTestCtrlZSuppressKeyDown = {
- app::VKEY_Z, true, false, false, false,
+ ui::VKEY_Z, true, false, false, false,
true, false, false, false, 4,
{ "D 17 0 true false false false",
"D 90 0 true false false false",
@@ -422,7 +422,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
// Ctrl+Enter shall generate a keypress event with charCode=10 (LF).
static const KeyEventTestData kTestCtrlEnter = {
- app::VKEY_RETURN, true, false, false, false,
+ ui::VKEY_RETURN, true, false, false, false,
false, false, false, false, 5,
{ "D 17 0 true false false false",
"D 13 0 true false false false",
@@ -447,7 +447,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
// Press Escape to close the Find box and move the focus back to the web page.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_ESCAPE, false, false, false, false));
+ browser(), ui::VKEY_ESCAPE, false, false, false, false));
ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
// Press Ctrl+F with keydown suppressed shall not open the find box.
@@ -461,7 +461,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CtrlKeyEvents) {
#elif defined(OS_MACOSX)
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CommandKeyEvents) {
static const KeyEventTestData kTestCmdF = {
- app::VKEY_F, false, false, false, true,
+ ui::VKEY_F, false, false, false, true,
false, false, false, false, 2,
{ "D 91 0 false false false true",
"D 70 0 false false false true" }
@@ -469,7 +469,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CommandKeyEvents) {
// On Mac we don't send key up events when command modifier is down.
static const KeyEventTestData kTestCmdFSuppressKeyDown = {
- app::VKEY_F, false, false, false, true,
+ ui::VKEY_F, false, false, false, true,
true, false, false, false, 3,
{ "D 91 0 false false false true",
"D 70 0 false false false true",
@@ -492,7 +492,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, CommandKeyEvents) {
// Press Escape to close the Find box and move the focus back to the web page.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_ESCAPE, false, false, false, false));
+ browser(), ui::VKEY_ESCAPE, false, false, false, false));
ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER_FOCUS_VIEW));
// Press Cmd+F with keydown suppressed shall not open the find box.
@@ -505,7 +505,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
#if defined(OS_MACOSX)
// On Mac, access keys use ctrl+alt modifiers.
static const KeyEventTestData kTestAccessA = {
- app::VKEY_A, true, false, true, false,
+ ui::VKEY_A, true, false, true, false,
false, false, false, false, 6,
{ "D 17 0 true false false false",
"D 18 0 true false true false",
@@ -516,7 +516,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
};
static const KeyEventTestData kTestAccessDSuppress = {
- app::VKEY_D, true, false, true, false,
+ ui::VKEY_D, true, false, true, false,
true, true, true, false, 6,
{ "D 17 0 true false false false",
"D 18 0 true false true false",
@@ -527,7 +527,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
};
static const KeyEventTestData kTestAccess1 = {
- app::VKEY_1, true, false, true, false,
+ ui::VKEY_1, true, false, true, false,
false, false, false, false, 6,
{ "D 17 0 true false false false",
"D 18 0 true false true false",
@@ -538,7 +538,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
};
#else
static const KeyEventTestData kTestAccessA = {
- app::VKEY_A, false, false, true, false,
+ ui::VKEY_A, false, false, true, false,
false, false, false, false, 4,
{ "D 18 0 false false true false",
"D 65 0 false false true false",
@@ -547,14 +547,14 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
};
static const KeyEventTestData kTestAccessD = {
- app::VKEY_D, false, false, true, false,
+ ui::VKEY_D, false, false, true, false,
false, false, false, false, 2,
{ "D 18 0 false false true false",
"D 68 0 false false true false" }
};
static const KeyEventTestData kTestAccessDSuppress = {
- app::VKEY_D, false, false, true, false,
+ ui::VKEY_D, false, false, true, false,
true, true, true, false, 4,
{ "D 18 0 false false true false",
"D 68 0 false false true false",
@@ -563,7 +563,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, AccessKeys) {
};
static const KeyEventTestData kTestAccess1 = {
- app::VKEY_1, false, false, true, false,
+ ui::VKEY_1, false, false, true, false,
false, false, false, false, 4,
{ "D 18 0 false false true false",
"D 49 0 false false true false",
@@ -651,11 +651,11 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_ReservedAccelerators) {
static const KeyEventTestData kTestCtrlOrCmdT = {
#if defined(OS_MACOSX)
- app::VKEY_T, false, false, false, true,
+ ui::VKEY_T, false, false, false, true,
true, false, false, false, 1,
{ "D 91 0 false false false true" }
#else
- app::VKEY_T, true, false, false, false,
+ ui::VKEY_T, true, false, false, false,
true, false, false, false, 1,
{ "D 17 0 true false false false" }
#endif
@@ -698,10 +698,10 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_ReservedAccelerators) {
// Press Ctrl/Cmd+W, which will close the tab.
#if defined(OS_MACOSX)
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_W, false, false, false, true));
+ browser(), ui::VKEY_W, false, false, false, true));
#else
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_W, true, false, false, false));
+ browser(), ui::VKEY_W, true, false, false, false));
#endif
ASSERT_NO_FATAL_FAILURE(wait_for_tab_closed.Wait());
@@ -712,7 +712,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, DISABLED_ReservedAccelerators) {
#if defined(OS_MACOSX)
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) {
static const KeyEventTestData kTestCtrlA = {
- app::VKEY_A, true, false, false, false,
+ ui::VKEY_A, true, false, false, false,
false, false, false, false, 4,
{ "D 17 0 true false false false",
"D 65 0 true false false false",
@@ -721,7 +721,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) {
};
static const KeyEventTestData kTestCtrlF = {
- app::VKEY_F, true, false, false, false,
+ ui::VKEY_F, true, false, false, false,
false, false, false, false, 4,
{ "D 17 0 true false false false",
"D 70 0 true false false false",
@@ -730,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) {
};
static const KeyEventTestData kTestCtrlK = {
- app::VKEY_K, true, false, false, false,
+ ui::VKEY_K, true, false, false, false,
false, false, false, false, 4,
{ "D 17 0 true false false false",
"D 75 0 true false false false",
@@ -762,14 +762,14 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, EditorKeyBindings) {
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, PageUpDownKeys) {
static const KeyEventTestData kTestPageUp = {
- app::VKEY_PRIOR, false, false, false, false,
+ ui::VKEY_PRIOR, false, false, false, false,
false, false, false, false, 2,
{ "D 33 0 false false false false",
"U 33 0 false false false false" }
};
static const KeyEventTestData kTestPageDown = {
- app::VKEY_NEXT, false, false, false, false,
+ ui::VKEY_NEXT, false, false, false, false,
false, false, false, false, 2,
{ "D 34 0 false false false false",
"U 34 0 false false false false" }
@@ -794,21 +794,21 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, PageUpDownKeys) {
#if defined(OS_WIN) || defined(TOOLKIT_VIEWS)
IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, FocusMenuBarByAltKey) {
static const KeyEventTestData kTestAltKey = {
- app::VKEY_MENU, false, false, false, false,
+ ui::VKEY_MENU, false, false, false, false,
false, false, false, false, 2,
{ "D 18 0 false false true false",
"U 18 0 false false true false" }
};
static const KeyEventTestData kTestAltKeySuppress = {
- app::VKEY_MENU, false, false, false, false,
+ ui::VKEY_MENU, false, false, false, false,
true, false, false, false, 2,
{ "D 18 0 false false true false",
"U 18 0 false false true false" }
};
static const KeyEventTestData kTestCtrlAltKey = {
- app::VKEY_MENU, true, false, false, false,
+ ui::VKEY_MENU, true, false, false, false,
false, false, false, false, 4,
{ "D 17 0 true false false false",
"D 18 0 true false true false",
diff --git a/chrome/browser/chromeos/login/captcha_view.cc b/chrome/browser/chromeos/login/captcha_view.cc
index ca2438f..88658fc 100644
--- a/chrome/browser/chromeos/login/captcha_view.cc
+++ b/chrome/browser/chromeos/login/captcha_view.cc
@@ -123,7 +123,7 @@ void CaptchaView::ViewHierarchyChanged(bool is_add,
bool CaptchaView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
if (sender == captcha_textfield_ &&
- key_event.GetKeyCode() == app::VKEY_RETURN) {
+ key_event.GetKeyCode() == ui::VKEY_RETURN) {
if (is_standalone_) {
Accept();
} else {
diff --git a/chrome/browser/chromeos/login/existing_user_view.cc b/chrome/browser/chromeos/login/existing_user_view.cc
index 2c3176e..26bb6ba 100644
--- a/chrome/browser/chromeos/login/existing_user_view.cc
+++ b/chrome/browser/chromeos/login/existing_user_view.cc
@@ -33,13 +33,13 @@ class UserEntryTextfield : public TextfieldWithMargin {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_TAB) {
+ if (e.GetKeyCode() == ui::VKEY_TAB) {
controller_->SelectUserRelative(e.IsShiftDown() ? -1 : 1);
return true;
- } else if (e.GetKeyCode() == app::VKEY_LEFT) {
+ } else if (e.GetKeyCode() == ui::VKEY_LEFT) {
controller_->SelectUserRelative(-1);
return true;
- } else if (e.GetKeyCode() == app::VKEY_RIGHT) {
+ } else if (e.GetKeyCode() == ui::VKEY_RIGHT) {
controller_->SelectUserRelative(1);
return true;
} else {
@@ -48,7 +48,7 @@ class UserEntryTextfield : public TextfieldWithMargin {
}
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_TAB)
+ if (e.GetKeyCode() == ui::VKEY_TAB)
return true;
else
return views::Textfield::SkipDefaultKeyEventProcessing(e);
@@ -65,7 +65,7 @@ ExistingUserView::ExistingUserView(UserController* user_controller)
: user_controller_(user_controller),
password_field_(NULL),
accel_login_off_the_record_(
- views::Accelerator(app::VKEY_B, false, false, true)),
+ views::Accelerator(ui::VKEY_B, false, false, true)),
accel_toggle_accessibility_(
WizardAccessibilityHelper::GetAccelerator()) {
AddAccelerator(accel_login_off_the_record_);
@@ -104,7 +104,7 @@ bool ExistingUserView::AcceleratorPressed(
bool ExistingUserView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
- if (key_event.GetKeyCode() == app::VKEY_RETURN) {
+ if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
if (!password_field_->text().empty())
user_controller_->OnLogin("", UTF16ToUTF8(password_field_->text()));
} else {
diff --git a/chrome/browser/chromeos/login/guest_user_view.cc b/chrome/browser/chromeos/login/guest_user_view.cc
index 0fcc48d..0dd63124 100644
--- a/chrome/browser/chromeos/login/guest_user_view.cc
+++ b/chrome/browser/chromeos/login/guest_user_view.cc
@@ -23,7 +23,7 @@ class UserEntryButton : public login::WideButton {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_TAB) {
+ if (e.GetKeyCode() == ui::VKEY_TAB) {
user_controller_->SelectUserRelative(e.IsShiftDown() ? -1 : 1);
return true;
}
@@ -31,7 +31,7 @@ class UserEntryButton : public login::WideButton {
}
virtual bool SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_TAB)
+ if (e.GetKeyCode() == ui::VKEY_TAB)
return true;
return WideButton::SkipDefaultKeyEventProcessing(e);
}
@@ -49,11 +49,11 @@ GuestUserView::GuestUserView(UserController* uc)
accel_toggle_accessibility_(
WizardAccessibilityHelper::GetAccelerator()),
accel_login_off_the_record_(
- views::Accelerator(app::VKEY_B, false, false, true)),
+ views::Accelerator(ui::VKEY_B, false, false, true)),
accel_previous_pod_by_arrow_(
- views::Accelerator(app::VKEY_LEFT, false, false, false)),
+ views::Accelerator(ui::VKEY_LEFT, false, false, false)),
accel_next_pod_by_arrow_(
- views::Accelerator(app::VKEY_RIGHT, false, false, false)) {
+ views::Accelerator(ui::VKEY_RIGHT, false, false, false)) {
AddAccelerator(accel_toggle_accessibility_);
AddAccelerator(accel_login_off_the_record_);
AddAccelerator(accel_previous_pod_by_arrow_);
diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc
index cd2508c..6a40795 100644
--- a/chrome/browser/chromeos/login/new_user_view.cc
+++ b/chrome/browser/chromeos/login/new_user_view.cc
@@ -10,7 +10,6 @@
#include <algorithm>
#include <vector>
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/callback.h"
@@ -29,6 +28,7 @@
#include "grit/app_resources.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/controls/label.h"
#include "views/controls/throbber.h"
#include "views/widget/widget_gtk.h"
@@ -81,7 +81,7 @@ class UsernameField : public chromeos::TextfieldWithMargin {
// Overridden from views::View:
virtual bool OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_LEFT) {
+ if (e.GetKeyCode() == ui::VKEY_LEFT) {
return controller_->NavigateAway();
}
return false;
@@ -111,10 +111,10 @@ NewUserView::NewUserView(Delegate* delegate,
create_account_link_(NULL),
guest_link_(NULL),
languages_menubutton_(NULL),
- accel_focus_pass_(views::Accelerator(app::VKEY_P, false, false, true)),
- accel_focus_user_(views::Accelerator(app::VKEY_U, false, false, true)),
+ accel_focus_pass_(views::Accelerator(ui::VKEY_P, false, false, true)),
+ accel_focus_user_(views::Accelerator(ui::VKEY_U, false, false, true)),
accel_login_off_the_record_(
- views::Accelerator(app::VKEY_B, false, false, true)),
+ views::Accelerator(ui::VKEY_B, false, false, true)),
accel_toggle_accessibility_(WizardAccessibilityHelper::GetAccelerator()),
delegate_(delegate),
ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)),
@@ -530,7 +530,7 @@ bool NewUserView::HandleKeyEvent(views::Textfield* sender,
if (!CrosLibrary::Get()->EnsureLoaded() || login_in_process_)
return false;
- if (key_event.GetKeyCode() == app::VKEY_RETURN) {
+ if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
if (!username_field_->text().empty() && !password_field_->text().empty())
Login();
// Return true so that processing ends
diff --git a/chrome/browser/chromeos/login/password_changed_view.cc b/chrome/browser/chromeos/login/password_changed_view.cc
index 3c3b835..8cb01d5 100644
--- a/chrome/browser/chromeos/login/password_changed_view.cc
+++ b/chrome/browser/chromeos/login/password_changed_view.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/chromeos/login/password_changed_view.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/utf_string_conversions.h"
@@ -12,6 +11,7 @@
#include "chrome/browser/chromeos/login/wizard_accessibility_helper.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/controls/button/radio_button.h"
#include "views/controls/label.h"
#include "views/grid_layout.h"
diff --git a/chrome/browser/chromeos/login/screen_lock_view.cc b/chrome/browser/chromeos/login/screen_lock_view.cc
index 0e9aa50..4508501 100644
--- a/chrome/browser/chromeos/login/screen_lock_view.cc
+++ b/chrome/browser/chromeos/login/screen_lock_view.cc
@@ -191,7 +191,7 @@ bool ScreenLockView::HandleKeyEvent(
views::Textfield* sender,
const views::KeyEvent& key_event) {
screen_locker_->ClearErrors();
- if (key_event.GetKeyCode() == app::VKEY_RETURN) {
+ if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
screen_locker_->Authenticate(password_field_->text());
return true;
}
diff --git a/chrome/browser/chromeos/login/screen_locker.cc b/chrome/browser/chromeos/login/screen_locker.cc
index 09de9ef..5bc78cb 100644
--- a/chrome/browser/chromeos/login/screen_locker.cc
+++ b/chrome/browser/chromeos/login/screen_locker.cc
@@ -994,7 +994,7 @@ ScreenLocker::~ScreenLocker() {
MessageLoopForUI::current()->RemoveObserver(input_event_observer_.get());
if (locker_input_event_observer_.get()) {
lock_widget_->GetFocusManager()->UnregisterAccelerator(
- views::Accelerator(app::VKEY_ESCAPE, false, false, false), this);
+ views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this);
MessageLoopForUI::current()->RemoveObserver(
locker_input_event_observer_.get());
}
@@ -1029,7 +1029,7 @@ void ScreenLocker::ScreenLockReady() {
if (background_view_->ScreenSaverEnabled()) {
lock_widget_->GetFocusManager()->RegisterAccelerator(
- views::Accelerator(app::VKEY_ESCAPE, false, false, false), this);
+ views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this);
locker_input_event_observer_.reset(new LockerInputEventObserver(this));
MessageLoopForUI::current()->AddObserver(
locker_input_event_observer_.get());
diff --git a/chrome/browser/chromeos/login/screen_locker_browsertest.cc b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
index 2488b36..7b52c00 100644
--- a/chrome/browser/chromeos/login/screen_locker_browsertest.cc
+++ b/chrome/browser/chromeos/login/screen_locker_browsertest.cc
@@ -256,7 +256,7 @@ IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithMouseClick) {
void KeyPress(views::Widget* widget) {
ui_controls::SendKeyPress(GTK_WINDOW(widget->GetNativeView()),
- app::VKEY_SPACE, false, false, false, false);
+ ui::VKEY_SPACE, false, false, false, false);
}
IN_PROC_BROWSER_TEST_F(ScreenLockerTest, TestNoPasswordWithKeyPress) {
diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
index c8c8668..955b1e4 100644
--- a/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
+++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.cc
@@ -27,7 +27,7 @@ scoped_ptr<views::Accelerator> WizardAccessibilityHelper::accelerator_;
views::Accelerator WizardAccessibilityHelper::GetAccelerator() {
if (!WizardAccessibilityHelper::accelerator_.get())
WizardAccessibilityHelper::accelerator_.reset(
- new views::Accelerator(app::VKEY_Z, false, true, true));
+ new views::Accelerator(ui::VKEY_Z, false, true, true));
return *(WizardAccessibilityHelper::accelerator_.get());
}
diff --git a/chrome/browser/chromeos/login/wizard_accessibility_helper.h b/chrome/browser/chromeos/login/wizard_accessibility_helper.h
index 76c151a..3c057f6 100644
--- a/chrome/browser/chromeos/login/wizard_accessibility_helper.h
+++ b/chrome/browser/chromeos/login/wizard_accessibility_helper.h
@@ -9,12 +9,12 @@
#include <map>
#include <vector>
-#include "app/keyboard_codes.h"
#include "base/scoped_ptr.h"
#include "base/singleton.h"
#include "chrome/browser/chromeos/login/wizard_accessibility_handler.h"
#include "chrome/browser/ui/views/accessible_view_helper.h"
#include "chrome/common/notification_registrar.h"
+#include "ui/base/keycodes/keyboard_codes.h"
class Profile;
namespace views {
diff --git a/chrome/browser/chromeos/login/wizard_controller.cc b/chrome/browser/chromeos/login/wizard_controller.cc
index 26c33e6..d1c2702 100644
--- a/chrome/browser/chromeos/login/wizard_controller.cc
+++ b/chrome/browser/chromeos/login/wizard_controller.cc
@@ -82,24 +82,24 @@ class ContentView : public views::View {
: accel_toggle_accessibility_(
chromeos::WizardAccessibilityHelper::GetAccelerator()) {
#if defined(OFFICIAL_BUILD)
- accel_cancel_update_ = views::Accelerator(app::VKEY_ESCAPE,
+ accel_cancel_update_ = views::Accelerator(ui::VKEY_ESCAPE,
true, true, true);
#else
- accel_cancel_update_ = views::Accelerator(app::VKEY_ESCAPE,
+ accel_cancel_update_ = views::Accelerator(ui::VKEY_ESCAPE,
false, false, false);
- accel_account_screen_ = views::Accelerator(app::VKEY_A,
+ accel_account_screen_ = views::Accelerator(ui::VKEY_A,
false, true, true);
- accel_login_screen_ = views::Accelerator(app::VKEY_L,
+ accel_login_screen_ = views::Accelerator(ui::VKEY_L,
false, true, true);
- accel_network_screen_ = views::Accelerator(app::VKEY_N,
+ accel_network_screen_ = views::Accelerator(ui::VKEY_N,
false, true, true);
- accel_update_screen_ = views::Accelerator(app::VKEY_U,
+ accel_update_screen_ = views::Accelerator(ui::VKEY_U,
false, true, true);
- accel_image_screen_ = views::Accelerator(app::VKEY_I,
+ accel_image_screen_ = views::Accelerator(ui::VKEY_I,
false, true, true);
- accel_eula_screen_ = views::Accelerator(app::VKEY_E,
+ accel_eula_screen_ = views::Accelerator(ui::VKEY_E,
false, true, true);
- accel_register_screen_ = views::Accelerator(app::VKEY_R,
+ accel_register_screen_ = views::Accelerator(ui::VKEY_R,
false, true, true);
AddAccelerator(accel_account_screen_);
AddAccelerator(accel_login_screen_);
diff --git a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
index 1104be2..d2a1ef9 100644
--- a/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
+++ b/chrome/browser/chromeos/login/wizard_controller_browsertest.cc
@@ -220,11 +220,11 @@ IN_PROC_BROWSER_TEST_F(WizardControllerFlowTest, MAYBE_Accelerators) {
views::FocusManager* focus_manager =
controller()->contents()->GetFocusManager();
- views::Accelerator accel_account_screen(app::VKEY_A, false, true, true);
- views::Accelerator accel_network_screen(app::VKEY_N, false, true, true);
- views::Accelerator accel_update_screen(app::VKEY_U, false, true, true);
- views::Accelerator accel_image_screen(app::VKEY_I, false, true, true);
- views::Accelerator accel_eula_screen(app::VKEY_E, false, true, true);
+ views::Accelerator accel_account_screen(ui::VKEY_A, false, true, true);
+ views::Accelerator accel_network_screen(ui::VKEY_N, false, true, true);
+ views::Accelerator accel_update_screen(ui::VKEY_U, false, true, true);
+ views::Accelerator accel_image_screen(ui::VKEY_I, false, true, true);
+ views::Accelerator accel_eula_screen(ui::VKEY_E, false, true, true);
EXPECT_CALL(*mock_network_screen_, Hide()).Times(1);
EXPECT_CALL(*mock_account_screen_, Show()).Times(1);
diff --git a/chrome/browser/chromeos/options/wifi_config_view.cc b/chrome/browser/chromeos/options/wifi_config_view.cc
index 9b8fdd8..2f2740e 100644
--- a/chrome/browser/chromeos/options/wifi_config_view.cc
+++ b/chrome/browser/chromeos/options/wifi_config_view.cc
@@ -152,7 +152,7 @@ void WifiConfigView::ContentsChanged(views::Textfield* sender,
bool WifiConfigView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
if (sender == passphrase_textfield_ &&
- key_event.GetKeyCode() == app::VKEY_RETURN) {
+ key_event.GetKeyCode() == ui::VKEY_RETURN) {
parent_->GetDialogClientView()->AcceptWindow();
}
return false;
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index 58c2a67..0ceb891 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -6,7 +6,6 @@
#include <list>
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/message_loop.h"
@@ -49,6 +48,7 @@
#include "chrome/common/view_types.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/context_menu.h"
#if defined(TOOLKIT_VIEWS)
@@ -707,7 +707,7 @@ bool ExtensionHost::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
bool* is_keyboard_shortcut) {
if (extension_host_type_ == ViewType::EXTENSION_POPUP &&
event.type == NativeWebKeyboardEvent::RawKeyDown &&
- event.windowsKeyCode == app::VKEY_ESCAPE) {
+ event.windowsKeyCode == ui::VKEY_ESCAPE) {
DCHECK(is_keyboard_shortcut != NULL);
*is_keyboard_shortcut = true;
}
@@ -717,7 +717,7 @@ bool ExtensionHost::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
void ExtensionHost::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
if (extension_host_type_ == ViewType::EXTENSION_POPUP) {
if (event.type == NativeWebKeyboardEvent::RawKeyDown &&
- event.windowsKeyCode == app::VKEY_ESCAPE) {
+ event.windowsKeyCode == ui::VKEY_ESCAPE) {
NotificationService::current()->Notify(
NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE,
Source<Profile>(profile_),
diff --git a/chrome/browser/extensions/extension_input_api.cc b/chrome/browser/extensions/extension_input_api.cc
index bb308f4..b59cf0e 100644
--- a/chrome/browser/extensions/extension_input_api.cc
+++ b/chrome/browser/extensions/extension_input_api.cc
@@ -6,7 +6,6 @@
#include <string>
-#include "app/keyboard_code_conversion.h"
#include "base/string_util.h"
#include "base/values.h"
#include "chrome/browser/browser_window.h"
@@ -16,6 +15,7 @@
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/common/native_web_keyboard_event.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
+#include "ui/base/keycodes/keyboard_code_conversion.h"
#include "views/event.h"
#include "views/widget/root_view.h"
@@ -86,8 +86,8 @@ bool SendKeyboardEventInputFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args->GetString(kKeyIdentifier, &identifier));
TrimWhitespaceASCII(identifier, TRIM_ALL, &identifier);
- app::KeyboardCode code = app::KeyCodeFromKeyIdentifier(identifier);
- if (code == app::VKEY_UNKNOWN) {
+ ui::KeyboardCode code = ui::KeyCodeFromKeyIdentifier(identifier);
+ if (code == ui::VKEY_UNKNOWN) {
error_ = kUnknownOrUnsupportedKeyIdentiferError;
return false;
}
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 780854e..b8523c7 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -1022,7 +1022,7 @@ void ExternalTabContainer::LoadAccelerators() {
bool ctrl_down = (accelerators[i].fVirt & FCONTROL) == FCONTROL;
bool shift_down = (accelerators[i].fVirt & FSHIFT) == FSHIFT;
views::Accelerator accelerator(
- static_cast<app::KeyboardCode>(accelerators[i].key),
+ static_cast<ui::KeyboardCode>(accelerators[i].key),
shift_down, ctrl_down, alt_down);
accelerator_table_[accelerator] = accelerators[i].cmd;
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index a06c702..c8499f8 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -8,7 +8,6 @@
#include <string>
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "base/base_paths.h"
#include "base/command_line.h"
@@ -87,6 +86,7 @@
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace {
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 6eaca52..816b4a3 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -111,7 +111,7 @@ class InstantTest : public InProcessBrowserTest {
NotificationType::INSTANT_CONTROLLER_SHOWN);
}
- void SendKey(app::KeyboardCode key) {
+ void SendKey(ui::KeyboardCode key) {
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
browser(), key, false, false, false, false));
}
@@ -480,7 +480,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, OnSubmitEvent) {
ASSERT_NO_FATAL_FAILURE(SetupPreview());
ASSERT_NO_FATAL_FAILURE(SetLocationBarText(L"abc"));
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_RETURN));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_RETURN));
// Check that the preview contents have been committed.
ASSERT_FALSE(browser()->instant()->GetPreviewContents());
@@ -534,7 +534,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_TabKey) {
ASSERT_NO_FATAL_FAILURE(SetLocationBarText(L"abc"));
// Pressing tab to convert instant suggest into inline autocomplete.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_TAB));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_TAB));
ASSERT_EQ(L"abcdef", location_bar_->location_entry()->GetText());
@@ -542,7 +542,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE_TabKey) {
GetSearchStateAsString(preview_));
// Pressing tab again to accept the current instant preview.
- ASSERT_NO_FATAL_FAILURE(SendKey(app::VKEY_TAB));
+ ASSERT_NO_FATAL_FAILURE(SendKey(ui::VKEY_TAB));
// Check that the preview contents have been committed.
ASSERT_FALSE(browser()->instant()->GetPreviewContents());
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 6848483..10e7261 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/renderer_host/render_widget_host.h"
-#include "app/keyboard_codes.h"
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/message_loop.h"
@@ -23,6 +22,7 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin.h"
@@ -540,8 +540,8 @@ void RenderWidgetHost::ForwardKeyboardEvent(
return;
if (key_event.type == WebKeyboardEvent::Char &&
- (key_event.windowsKeyCode == app::VKEY_RETURN ||
- key_event.windowsKeyCode == app::VKEY_SPACE)) {
+ (key_event.windowsKeyCode == ui::VKEY_RETURN ||
+ key_event.windowsKeyCode == ui::VKEY_SPACE)) {
OnUserGesture();
}
diff --git a/chrome/browser/renderer_host/render_widget_host_unittest.cc b/chrome/browser/renderer_host/render_widget_host_unittest.cc
index 86bf0b4..c5dbd43 100644
--- a/chrome/browser/renderer_host/render_widget_host_unittest.cc
+++ b/chrome/browser/renderer_host/render_widget_host_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/shared_memory.h"
@@ -17,6 +16,7 @@
#include "chrome/test/testing_profile.h"
#include "gfx/canvas_skia.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/keycodes/keyboard_codes.h"
using base::TimeDelta;
@@ -276,7 +276,7 @@ class RenderWidgetHostTest : public testing::Test {
void SimulateKeyboardEvent(WebInputEvent::Type type) {
NativeWebKeyboardEvent key_event;
key_event.type = type;
- key_event.windowsKeyCode = app::VKEY_L; // non-null made up value.
+ key_event.windowsKeyCode = ui::VKEY_L; // non-null made up value.
host_->ForwardKeyboardEvent(key_event);
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index 55fc12c..89fc7b47 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -7,7 +7,6 @@
#include <algorithm>
#include <string>
-#include "app/keyboard_code_conversion_gtk.h"
#include "app/l10n_util.h"
#include "app/x11_util.h"
#include "base/command_line.h"
@@ -25,6 +24,7 @@
#include "gfx/canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
+#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
#include "views/event.h"
#include "views/widget/widget.h"
#include "views/widget/widget_gtk.h"
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
index 611ecdd..361579d 100644
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/html_dialog_window_controller.h"
-#include "app/keyboard_codes.h"
#include "base/logging.h"
#include "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
@@ -17,6 +16,7 @@
#include "chrome/common/native_web_keyboard_event.h"
#include "gfx/size.h"
#include "ipc/ipc_message.h"
+#include "ui/base/keycodes/keyboard_codes.h"
// Thin bridge that routes notifications to
// HtmlDialogWindowController's member variables.
@@ -195,8 +195,8 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent(
// TODO(thakis): It would be nice to get cancel: to work somehow.
// Bug: http://code.google.com/p/chromium/issues/detail?id=32828 .
if (event.type == NativeWebKeyboardEvent::RawKeyDown &&
- ((event.windowsKeyCode == app::VKEY_ESCAPE) ||
- (event.windowsKeyCode == app::VKEY_OEM_PERIOD &&
+ ((event.windowsKeyCode == ui::VKEY_ESCAPE) ||
+ (event.windowsKeyCode == ui::VKEY_OEM_PERIOD &&
event.modifiers == NativeWebKeyboardEvent::MetaKey))) {
[controller_ close];
return;
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 06a7b12..b673175 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -20,6 +19,7 @@
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "net/test/test_server.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#if defined(TOOLKIT_VIEWS)
#include "chrome/browser/ui/views/find_bar_host.h"
@@ -739,7 +739,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
browser()->window()->GetNativeHandle());
// See where Escape is registered.
- views::Accelerator escape(app::VKEY_ESCAPE, false, false, false);
+ views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
views::AcceleratorTarget* old_target =
focus_manager->GetCurrentTargetForAccelerator(escape);
EXPECT_TRUE(old_target != NULL);
diff --git a/chrome/browser/ui/views/accelerator_table_gtk.cc b/chrome/browser/ui/views/accelerator_table_gtk.cc
index 5a3d0f7..025714b 100644
--- a/chrome/browser/ui/views/accelerator_table_gtk.cc
+++ b/chrome/browser/ui/views/accelerator_table_gtk.cc
@@ -4,9 +4,9 @@
#include "chrome/browser/ui/views/accelerator_table_gtk.h"
-#include "app/keyboard_codes.h"
#include "base/basictypes.h"
#include "chrome/app/chrome_command_ids.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace browser {
@@ -14,144 +14,144 @@ namespace browser {
// the Windows accelerators in ../../app/chrome_dll.rc.
const AcceleratorMapping kAcceleratorMap[] = {
// Keycode Shift Ctrl Alt Command ID
- { app::VKEY_A, true, true, false, IDC_AUTOFILL_DEFAULT },
- { app::VKEY_LEFT, false, false, true, IDC_BACK },
- { app::VKEY_BACK, false, false, false, IDC_BACK },
+ { ui::VKEY_A, true, true, false, IDC_AUTOFILL_DEFAULT },
+ { ui::VKEY_LEFT, false, false, true, IDC_BACK },
+ { ui::VKEY_BACK, false, false, false, IDC_BACK },
#if defined(OS_CHROMEOS)
- { app::VKEY_F1, false, false, false, IDC_BACK },
+ { ui::VKEY_F1, false, false, false, IDC_BACK },
// TODO(mazda): Change VKEY_1 to VKEY_OME_2 once the new version of the
// keyboard overlay is ready.
- { app::VKEY_1, false, true, true, IDC_SHOW_KEYBOARD_OVERLAY },
+ { ui::VKEY_1, false, true, true, IDC_SHOW_KEYBOARD_OVERLAY },
#endif
- { app::VKEY_D, false, true, false, IDC_BOOKMARK_PAGE },
- { app::VKEY_D, true, true, false, IDC_BOOKMARK_ALL_TABS },
- { app::VKEY_DELETE, true, true, false, IDC_CLEAR_BROWSING_DATA },
+ { ui::VKEY_D, false, true, false, IDC_BOOKMARK_PAGE },
+ { ui::VKEY_D, true, true, false, IDC_BOOKMARK_ALL_TABS },
+ { ui::VKEY_DELETE, true, true, false, IDC_CLEAR_BROWSING_DATA },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F4, false, true, false, IDC_CLOSE_TAB },
+ { ui::VKEY_F4, false, true, false, IDC_CLOSE_TAB },
#endif
- { app::VKEY_W, false, true, false, IDC_CLOSE_TAB },
- { app::VKEY_W, true, true, false, IDC_CLOSE_WINDOW },
+ { ui::VKEY_W, false, true, false, IDC_CLOSE_TAB },
+ { ui::VKEY_W, true, true, false, IDC_CLOSE_WINDOW },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F4, false, false, true, IDC_CLOSE_WINDOW },
+ { ui::VKEY_F4, false, false, true, IDC_CLOSE_WINDOW },
#endif
- { app::VKEY_Q, true, true, false, IDC_EXIT },
- { app::VKEY_F, false, true, false, IDC_FIND },
- { app::VKEY_G, false, true, false, IDC_FIND_NEXT },
+ { ui::VKEY_Q, true, true, false, IDC_EXIT },
+ { ui::VKEY_F, false, true, false, IDC_FIND },
+ { ui::VKEY_G, false, true, false, IDC_FIND_NEXT },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F3, false, false, false, IDC_FIND_NEXT },
+ { ui::VKEY_F3, false, false, false, IDC_FIND_NEXT },
#endif
- { app::VKEY_G, true, true, false, IDC_FIND_PREVIOUS },
+ { ui::VKEY_G, true, true, false, IDC_FIND_PREVIOUS },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F3, true, false, false, IDC_FIND_PREVIOUS },
+ { ui::VKEY_F3, true, false, false, IDC_FIND_PREVIOUS },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_S, true, false, true, IDC_FOCUS_CHROMEOS_STATUS },
+ { ui::VKEY_S, true, false, true, IDC_FOCUS_CHROMEOS_STATUS },
#endif
- { app::VKEY_D, false, false, true, IDC_FOCUS_LOCATION },
- { app::VKEY_L, false, true, false, IDC_FOCUS_LOCATION },
+ { ui::VKEY_D, false, false, true, IDC_FOCUS_LOCATION },
+ { ui::VKEY_L, false, true, false, IDC_FOCUS_LOCATION },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F10, false, false, false, IDC_FOCUS_MENU_BAR },
+ { ui::VKEY_F10, false, false, false, IDC_FOCUS_MENU_BAR },
#endif
- { app::VKEY_MENU, false, false, false, IDC_FOCUS_MENU_BAR },
+ { ui::VKEY_MENU, false, false, false, IDC_FOCUS_MENU_BAR },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F6, false, false, false, IDC_FOCUS_NEXT_PANE },
+ { ui::VKEY_F6, false, false, false, IDC_FOCUS_NEXT_PANE },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_F2, false, true, false, IDC_FOCUS_NEXT_PANE },
+ { ui::VKEY_F2, false, true, false, IDC_FOCUS_NEXT_PANE },
#endif
#if !defined(OS_CHROMEOS)
- { app::VKEY_F6, true, false, false, IDC_FOCUS_PREVIOUS_PANE },
+ { ui::VKEY_F6, true, false, false, IDC_FOCUS_PREVIOUS_PANE },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_F1, false, true, false, IDC_FOCUS_PREVIOUS_PANE },
-#endif
- { app::VKEY_K, false, true, false, IDC_FOCUS_SEARCH },
- { app::VKEY_E, false, true, false, IDC_FOCUS_SEARCH },
- { app::VKEY_BROWSER_SEARCH, false, false, false, IDC_FOCUS_SEARCH },
- { app::VKEY_T, true, false, true, IDC_FOCUS_TOOLBAR },
- { app::VKEY_B, true, false, true, IDC_FOCUS_BOOKMARKS },
- { app::VKEY_RIGHT, false, false, true, IDC_FORWARD },
- { app::VKEY_BACK, true, false, false, IDC_FORWARD },
+ { ui::VKEY_F1, false, true, false, IDC_FOCUS_PREVIOUS_PANE },
+#endif
+ { ui::VKEY_K, false, true, false, IDC_FOCUS_SEARCH },
+ { ui::VKEY_E, false, true, false, IDC_FOCUS_SEARCH },
+ { ui::VKEY_BROWSER_SEARCH, false, false, false, IDC_FOCUS_SEARCH },
+ { ui::VKEY_T, true, false, true, IDC_FOCUS_TOOLBAR },
+ { ui::VKEY_B, true, false, true, IDC_FOCUS_BOOKMARKS },
+ { ui::VKEY_RIGHT, false, false, true, IDC_FORWARD },
+ { ui::VKEY_BACK, true, false, false, IDC_FORWARD },
#if defined(OS_CHROMEOS)
- { app::VKEY_F2, false, false, false, IDC_FORWARD },
+ { ui::VKEY_F2, false, false, false, IDC_FORWARD },
#endif
#if !defined(OS_CHROMEOS)
- { app::VKEY_F11, false, false, false, IDC_FULLSCREEN },
+ { ui::VKEY_F11, false, false, false, IDC_FULLSCREEN },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_F4, false, false, false, IDC_FULLSCREEN },
+ { ui::VKEY_F4, false, false, false, IDC_FULLSCREEN },
#endif
#if !defined(OS_CHROMEOS)
- { app::VKEY_F1, false, false, false, IDC_HELP_PAGE },
+ { ui::VKEY_F1, false, false, false, IDC_HELP_PAGE },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_OEM_2, false, true, false, IDC_HELP_PAGE },
- { app::VKEY_OEM_2, true, true, false, IDC_HELP_PAGE },
-#endif
- { app::VKEY_I, true, true, false, IDC_DEV_TOOLS },
- { app::VKEY_J, true, true, false, IDC_DEV_TOOLS_CONSOLE },
- { app::VKEY_C, true, true, false, IDC_DEV_TOOLS_INSPECT },
- { app::VKEY_N, true, true, false, IDC_NEW_INCOGNITO_WINDOW },
- { app::VKEY_T, false, true, false, IDC_NEW_TAB },
- { app::VKEY_N, false, true, false, IDC_NEW_WINDOW },
- { app::VKEY_O, false, true, false, IDC_OPEN_FILE },
- { app::VKEY_P, false, true, false, IDC_PRINT},
- { app::VKEY_R, false, true, false, IDC_RELOAD },
- { app::VKEY_R, true, true, false, IDC_RELOAD_IGNORING_CACHE },
+ { ui::VKEY_OEM_2, false, true, false, IDC_HELP_PAGE },
+ { ui::VKEY_OEM_2, true, true, false, IDC_HELP_PAGE },
+#endif
+ { ui::VKEY_I, true, true, false, IDC_DEV_TOOLS },
+ { ui::VKEY_J, true, true, false, IDC_DEV_TOOLS_CONSOLE },
+ { ui::VKEY_C, true, true, false, IDC_DEV_TOOLS_INSPECT },
+ { ui::VKEY_N, true, true, false, IDC_NEW_INCOGNITO_WINDOW },
+ { ui::VKEY_T, false, true, false, IDC_NEW_TAB },
+ { ui::VKEY_N, false, true, false, IDC_NEW_WINDOW },
+ { ui::VKEY_O, false, true, false, IDC_OPEN_FILE },
+ { ui::VKEY_P, false, true, false, IDC_PRINT},
+ { ui::VKEY_R, false, true, false, IDC_RELOAD },
+ { ui::VKEY_R, true, true, false, IDC_RELOAD_IGNORING_CACHE },
#if !defined(OS_CHROMEOS)
- { app::VKEY_F5, false, false, false, IDC_RELOAD },
- { app::VKEY_F5, false, true, false, IDC_RELOAD_IGNORING_CACHE },
- { app::VKEY_F5, true, false, false, IDC_RELOAD_IGNORING_CACHE },
+ { ui::VKEY_F5, false, false, false, IDC_RELOAD },
+ { ui::VKEY_F5, false, true, false, IDC_RELOAD_IGNORING_CACHE },
+ { ui::VKEY_F5, true, false, false, IDC_RELOAD_IGNORING_CACHE },
#endif
#if defined(OS_CHROMEOS)
- { app::VKEY_F3, false, false, false, IDC_RELOAD },
- { app::VKEY_F3, false, true, false, IDC_RELOAD_IGNORING_CACHE },
- { app::VKEY_F3, true, false, false, IDC_RELOAD_IGNORING_CACHE },
+ { ui::VKEY_F3, false, false, false, IDC_RELOAD },
+ { ui::VKEY_F3, false, true, false, IDC_RELOAD_IGNORING_CACHE },
+ { ui::VKEY_F3, true, false, false, IDC_RELOAD_IGNORING_CACHE },
#endif
- { app::VKEY_HOME, false, false, true, IDC_HOME },
- { app::VKEY_T, true, true, false, IDC_RESTORE_TAB },
- { app::VKEY_S, false, true, false, IDC_SAVE_PAGE },
+ { ui::VKEY_HOME, false, false, true, IDC_HOME },
+ { ui::VKEY_T, true, true, false, IDC_RESTORE_TAB },
+ { ui::VKEY_S, false, true, false, IDC_SAVE_PAGE },
#if defined(OS_CHROMEOS)
- { app::VKEY_LWIN, false, false, false, IDC_SEARCH },
-#endif
- { app::VKEY_9, false, true, false, IDC_SELECT_LAST_TAB },
- { app::VKEY_NUMPAD9, false, true, false, IDC_SELECT_LAST_TAB },
- { app::VKEY_TAB, false, true, false, IDC_SELECT_NEXT_TAB },
- { app::VKEY_NEXT, false, true, false, IDC_SELECT_NEXT_TAB },
- { app::VKEY_TAB, true, true, false, IDC_SELECT_PREVIOUS_TAB },
- { app::VKEY_PRIOR, false, true, false, IDC_SELECT_PREVIOUS_TAB },
- { app::VKEY_1, false, true, false, IDC_SELECT_TAB_0 },
- { app::VKEY_NUMPAD1, false, true, false, IDC_SELECT_TAB_0 },
- { app::VKEY_2, false, true, false, IDC_SELECT_TAB_1 },
- { app::VKEY_NUMPAD2, false, true, false, IDC_SELECT_TAB_1 },
- { app::VKEY_3, false, true, false, IDC_SELECT_TAB_2 },
- { app::VKEY_NUMPAD3, false, true, false, IDC_SELECT_TAB_2 },
- { app::VKEY_4, false, true, false, IDC_SELECT_TAB_3 },
- { app::VKEY_NUMPAD4, false, true, false, IDC_SELECT_TAB_3 },
- { app::VKEY_5, false, true, false, IDC_SELECT_TAB_4 },
- { app::VKEY_NUMPAD5, false, true, false, IDC_SELECT_TAB_4 },
- { app::VKEY_6, false, true, false, IDC_SELECT_TAB_5 },
- { app::VKEY_NUMPAD6, false, true, false, IDC_SELECT_TAB_5 },
- { app::VKEY_7, false, true, false, IDC_SELECT_TAB_6 },
- { app::VKEY_NUMPAD7, false, true, false, IDC_SELECT_TAB_6 },
- { app::VKEY_8, false, true, false, IDC_SELECT_TAB_7 },
- { app::VKEY_NUMPAD8, false, true, false, IDC_SELECT_TAB_7 },
- { app::VKEY_B, true, true, false, IDC_SHOW_BOOKMARK_BAR },
- { app::VKEY_J, false, true, false, IDC_SHOW_DOWNLOADS },
- { app::VKEY_H, false, true, false, IDC_SHOW_HISTORY },
- { app::VKEY_F, false, false, true, IDC_SHOW_APP_MENU},
- { app::VKEY_E, false, false, true, IDC_SHOW_APP_MENU},
- { app::VKEY_ESCAPE, false, false, false, IDC_STOP },
- { app::VKEY_ESCAPE, true, false, false, IDC_TASK_MANAGER },
- { app::VKEY_U, false, true, false, IDC_VIEW_SOURCE },
- { app::VKEY_OEM_MINUS, false, true, false, IDC_ZOOM_MINUS },
- { app::VKEY_OEM_MINUS, true, true, false, IDC_ZOOM_MINUS },
- { app::VKEY_SUBTRACT, false, true, false, IDC_ZOOM_MINUS },
- { app::VKEY_0, false, true, false, IDC_ZOOM_NORMAL },
- { app::VKEY_NUMPAD0, false, true, false, IDC_ZOOM_NORMAL },
- { app::VKEY_OEM_PLUS, false, true, false, IDC_ZOOM_PLUS },
- { app::VKEY_OEM_PLUS, true, true, false, IDC_ZOOM_PLUS },
- { app::VKEY_ADD, false, true, false, IDC_ZOOM_PLUS },
+ { ui::VKEY_LWIN, false, false, false, IDC_SEARCH },
+#endif
+ { ui::VKEY_9, false, true, false, IDC_SELECT_LAST_TAB },
+ { ui::VKEY_NUMPAD9, false, true, false, IDC_SELECT_LAST_TAB },
+ { ui::VKEY_TAB, false, true, false, IDC_SELECT_NEXT_TAB },
+ { ui::VKEY_NEXT, false, true, false, IDC_SELECT_NEXT_TAB },
+ { ui::VKEY_TAB, true, true, false, IDC_SELECT_PREVIOUS_TAB },
+ { ui::VKEY_PRIOR, false, true, false, IDC_SELECT_PREVIOUS_TAB },
+ { ui::VKEY_1, false, true, false, IDC_SELECT_TAB_0 },
+ { ui::VKEY_NUMPAD1, false, true, false, IDC_SELECT_TAB_0 },
+ { ui::VKEY_2, false, true, false, IDC_SELECT_TAB_1 },
+ { ui::VKEY_NUMPAD2, false, true, false, IDC_SELECT_TAB_1 },
+ { ui::VKEY_3, false, true, false, IDC_SELECT_TAB_2 },
+ { ui::VKEY_NUMPAD3, false, true, false, IDC_SELECT_TAB_2 },
+ { ui::VKEY_4, false, true, false, IDC_SELECT_TAB_3 },
+ { ui::VKEY_NUMPAD4, false, true, false, IDC_SELECT_TAB_3 },
+ { ui::VKEY_5, false, true, false, IDC_SELECT_TAB_4 },
+ { ui::VKEY_NUMPAD5, false, true, false, IDC_SELECT_TAB_4 },
+ { ui::VKEY_6, false, true, false, IDC_SELECT_TAB_5 },
+ { ui::VKEY_NUMPAD6, false, true, false, IDC_SELECT_TAB_5 },
+ { ui::VKEY_7, false, true, false, IDC_SELECT_TAB_6 },
+ { ui::VKEY_NUMPAD7, false, true, false, IDC_SELECT_TAB_6 },
+ { ui::VKEY_8, false, true, false, IDC_SELECT_TAB_7 },
+ { ui::VKEY_NUMPAD8, false, true, false, IDC_SELECT_TAB_7 },
+ { ui::VKEY_B, true, true, false, IDC_SHOW_BOOKMARK_BAR },
+ { ui::VKEY_J, false, true, false, IDC_SHOW_DOWNLOADS },
+ { ui::VKEY_H, false, true, false, IDC_SHOW_HISTORY },
+ { ui::VKEY_F, false, false, true, IDC_SHOW_APP_MENU},
+ { ui::VKEY_E, false, false, true, IDC_SHOW_APP_MENU},
+ { ui::VKEY_ESCAPE, false, false, false, IDC_STOP },
+ { ui::VKEY_ESCAPE, true, false, false, IDC_TASK_MANAGER },
+ { ui::VKEY_U, false, true, false, IDC_VIEW_SOURCE },
+ { ui::VKEY_OEM_MINUS, false, true, false, IDC_ZOOM_MINUS },
+ { ui::VKEY_OEM_MINUS, true, true, false, IDC_ZOOM_MINUS },
+ { ui::VKEY_SUBTRACT, false, true, false, IDC_ZOOM_MINUS },
+ { ui::VKEY_0, false, true, false, IDC_ZOOM_NORMAL },
+ { ui::VKEY_NUMPAD0, false, true, false, IDC_ZOOM_NORMAL },
+ { ui::VKEY_OEM_PLUS, false, true, false, IDC_ZOOM_PLUS },
+ { ui::VKEY_OEM_PLUS, true, true, false, IDC_ZOOM_PLUS },
+ { ui::VKEY_ADD, false, true, false, IDC_ZOOM_PLUS },
};
const size_t kAcceleratorMapLength = arraysize(kAcceleratorMap);
diff --git a/chrome/browser/ui/views/accelerator_table_gtk.h b/chrome/browser/ui/views/accelerator_table_gtk.h
index 4b38144..865db16 100644
--- a/chrome/browser/ui/views/accelerator_table_gtk.h
+++ b/chrome/browser/ui/views/accelerator_table_gtk.h
@@ -8,14 +8,14 @@
#include <stdio.h>
-#include "app/keyboard_codes.h"
+#include "ui/base/keycodes/keyboard_codes.h"
// This contains the list of accelerators for the Linux toolkit_view
// implementation.
namespace browser {
struct AcceleratorMapping {
- app::KeyboardCode keycode;
+ ui::KeyboardCode keycode;
bool shift_pressed;
bool ctrl_pressed;
bool alt_pressed;
diff --git a/chrome/browser/ui/views/accessible_pane_view.cc b/chrome/browser/ui/views/accessible_pane_view.cc
index 1e07d1d..07b7a37 100644
--- a/chrome/browser/ui/views/accessible_pane_view.cc
+++ b/chrome/browser/ui/views/accessible_pane_view.cc
@@ -18,11 +18,11 @@ AccessiblePaneView::AccessiblePaneView()
: pane_has_focus_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
focus_manager_(NULL),
- home_key_(app::VKEY_HOME, false, false, false),
- end_key_(app::VKEY_END, false, false, false),
- escape_key_(app::VKEY_ESCAPE, false, false, false),
- left_key_(app::VKEY_LEFT, false, false, false),
- right_key_(app::VKEY_RIGHT, false, false, false),
+ home_key_(ui::VKEY_HOME, false, false, false),
+ end_key_(ui::VKEY_END, false, false, false),
+ escape_key_(ui::VKEY_ESCAPE, false, false, false),
+ left_key_(ui::VKEY_LEFT, false, false, false),
+ right_key_(ui::VKEY_RIGHT, false, false, false),
last_focused_view_storage_id_(-1) {
focus_search_.reset(new views::FocusSearch(this, true, true));
}
@@ -161,21 +161,21 @@ bool AccessiblePaneView::AcceleratorPressed(
}
switch (accelerator.GetKeyCode()) {
- case app::VKEY_ESCAPE:
+ case ui::VKEY_ESCAPE:
RemovePaneFocus();
RestoreLastFocusedView();
return true;
- case app::VKEY_LEFT:
+ case ui::VKEY_LEFT:
focus_manager_->AdvanceFocus(true);
return true;
- case app::VKEY_RIGHT:
+ case ui::VKEY_RIGHT:
focus_manager_->AdvanceFocus(false);
return true;
- case app::VKEY_HOME:
+ case ui::VKEY_HOME:
focus_manager_->SetFocusedViewWithReason(
GetFirstFocusableChild(), views::FocusManager::kReasonFocusTraversal);
return true;
- case app::VKEY_END:
+ case ui::VKEY_END:
focus_manager_->SetFocusedViewWithReason(
GetLastFocusableChild(), views::FocusManager::kReasonFocusTraversal);
return true;
diff --git a/chrome/browser/ui/views/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmark_bar_view_test.cc
index bc1253c..b360363 100644
--- a/chrome/browser/ui/views/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmark_bar_view_test.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -20,6 +19,7 @@
#include "chrome/test/ui_test_utils.h"
#include "grit/generated_resources.h"
#include "ui/base/clipboard/clipboard.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/button/text_button.h"
#include "views/controls/menu/menu_controller.h"
@@ -882,7 +882,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a down event, which should select the first item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_DOWN, false, false, false, false,
+ NULL, ui::VKEY_DOWN, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step3));
}
@@ -895,7 +895,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a key down event, which should select the next item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_DOWN, false, false, false, false,
+ NULL, ui::VKEY_DOWN, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step4));
}
@@ -908,7 +908,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a right arrow to force the menu to open.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_RIGHT, false, false, false, false,
+ NULL, ui::VKEY_RIGHT, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step5));
}
@@ -924,7 +924,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a left arrow to close the submenu.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_LEFT, false, false, false, false,
+ NULL, ui::VKEY_LEFT, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step6));
}
@@ -939,7 +939,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send a down arrow to wrap back to f1a
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_DOWN, false, false, false, false,
+ NULL, ui::VKEY_DOWN, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step7));
}
@@ -952,7 +952,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
// Send enter, which should select the item.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_RETURN, false, false, false, false,
+ NULL, ui::VKEY_RETURN, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest10::Step8));
}
@@ -1007,7 +1007,7 @@ class BookmarkBarViewTest11 : public BookmarkBarViewEventTestBase {
void Step3() {
// Send escape so that the context menu hides.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_ESCAPE, false, false, false, false,
+ NULL, ui::VKEY_ESCAPE, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest11::Step4));
}
@@ -1096,7 +1096,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
void Step4() {
// Press tab to give focus to the cancel button.
- ui_controls::SendKeyPress(NULL, app::VKEY_TAB, false, false, false, false);
+ ui_controls::SendKeyPress(NULL, ui::VKEY_TAB, false, false, false, false);
// For some reason return isn't processed correctly unless we delay.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -1106,7 +1106,7 @@ class BookmarkBarViewTest12 : public BookmarkBarViewEventTestBase {
void Step5() {
// And press enter so that the cancel button is selected.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_RETURN, false, false, false, false,
+ NULL, ui::VKEY_RETURN, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest12::Step6));
}
@@ -1235,7 +1235,7 @@ class BookmarkBarViewTest14 : public BookmarkBarViewEventTestBase {
// Send escape so that the context menu hides.
ui_controls::SendKeyPressNotifyWhenDone(
- NULL, app::VKEY_ESCAPE, false, false, false, false,
+ NULL, ui::VKEY_ESCAPE, false, false, false, false,
CreateEventTask(this, &BookmarkBarViewTest14::Step3));
}
diff --git a/chrome/browser/ui/views/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmark_bubble_view.cc
index 2f33f1f..1a6e3b6 100644
--- a/chrome/browser/ui/views/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmark_bubble_view.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/bookmark_bubble_view.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/string16.h"
@@ -22,6 +21,7 @@
#include "gfx/color_utils.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/event.h"
#include "views/standard_layout.h"
#include "views/controls/button/native_button.h"
@@ -138,7 +138,7 @@ void BookmarkBubbleView::DidChangeBounds(const gfx::Rect& previous,
void BookmarkBubbleView::BubbleShown() {
DCHECK(GetWidget());
GetFocusManager()->RegisterAccelerator(
- views::Accelerator(app::VKEY_RETURN, false, false, false), this);
+ views::Accelerator(ui::VKEY_RETURN, false, false, false), this);
title_tf_->RequestFocus();
title_tf_->SelectAll();
@@ -146,7 +146,7 @@ void BookmarkBubbleView::BubbleShown() {
bool BookmarkBubbleView::AcceleratorPressed(
const views::Accelerator& accelerator) {
- if (accelerator.GetKeyCode() != app::VKEY_RETURN)
+ if (accelerator.GetKeyCode() != ui::VKEY_RETURN)
return false;
if (edit_button_->HasFocus())
diff --git a/chrome/browser/ui/views/browser_keyboard_accessibility_test_win.cc b/chrome/browser/ui/views/browser_keyboard_accessibility_test_win.cc
index 0c31a5b..adbeaaf 100644
--- a/chrome/browser/ui/views/browser_keyboard_accessibility_test_win.cc
+++ b/chrome/browser/ui/views/browser_keyboard_accessibility_test_win.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/ui/views/chrome_views_delegate.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/view.h"
#include "views/accessibility/view_accessibility.h"
#include "views/widget/widget.h"
@@ -119,7 +119,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility,
// TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663.
LOG(ERROR) << "Sending TAB key event...";
ui_controls::SendKeyPressNotifyWhenDone(current_view_native_window(),
- app::VKEY_TAB,
+ ui::VKEY_TAB,
true, false, false, false,
new MessageLoop::QuitTask());
set_waiting(true);
@@ -153,7 +153,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility,
DISABLED_TabInToolbar) {
gfx::NativeWindow native_window = browser()->window()->GetNativeHandle();
ui_controls::SendKeyPressNotifyWhenDone(native_window,
- app::VKEY_T,
+ ui::VKEY_T,
false, true, true, false,
new MessageLoop::QuitTask());
set_waiting(true);
@@ -197,7 +197,7 @@ void BrowserKeyboardAccessibility::TabCycler(gfx::NativeWindow hwnd,
do {
// TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663.
LOG(ERROR) << "Sending TAB key event.";
- ui_controls::SendKeyPressNotifyWhenDone(hwnd, app::VKEY_TAB,
+ ui_controls::SendKeyPressNotifyWhenDone(hwnd, ui::VKEY_TAB,
false, !forward_tab, false, false, new MessageLoop::QuitTask());
set_waiting(true);
ui_test_utils::RunMessageLoop();
diff --git a/chrome/browser/ui/views/download_item_view.cc b/chrome/browser/ui/views/download_item_view.cc
index d35725b..f09cb48 100644
--- a/chrome/browser/ui/views/download_item_view.cc
+++ b/chrome/browser/ui/views/download_item_view.cc
@@ -876,8 +876,8 @@ bool DownloadItemView::OnKeyPressed(const views::KeyEvent& e) {
if (IsDangerousMode())
return true;
- if (e.GetKeyCode() == app::VKEY_SPACE ||
- e.GetKeyCode() == app::VKEY_RETURN) {
+ if (e.GetKeyCode() == ui::VKEY_SPACE ||
+ e.GetKeyCode() == ui::VKEY_RETURN) {
OpenDownload();
return true;
}
diff --git a/chrome/browser/ui/views/dropdown_bar_host.cc b/chrome/browser/ui/views/dropdown_bar_host.cc
index e181565f..7933b39 100644
--- a/chrome/browser/ui/views/dropdown_bar_host.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/dropdown_bar_host.h"
-#include "app/keyboard_codes.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/dropdown_bar_view.h"
@@ -12,6 +11,7 @@
#include "gfx/path.h"
#include "gfx/scrollbar_size.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/focus/external_focus_tracker.h"
#include "views/focus/view_storage.h"
#include "views/widget/widget.h"
@@ -305,14 +305,14 @@ void DropdownBarHost::UpdateWindowEdges(const gfx::Rect& new_pos) {
void DropdownBarHost::RegisterAccelerators() {
DCHECK(!esc_accel_target_registered_);
- views::Accelerator escape(app::VKEY_ESCAPE, false, false, false);
+ views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
focus_manager_->RegisterAccelerator(escape, this);
esc_accel_target_registered_ = true;
}
void DropdownBarHost::UnregisterAccelerators() {
DCHECK(esc_accel_target_registered_);
- views::Accelerator escape(app::VKEY_ESCAPE, false, false, false);
+ views::Accelerator escape(ui::VKEY_ESCAPE, false, false, false);
focus_manager_->UnregisterAccelerator(escape, this);
esc_accel_target_registered_ = false;
}
diff --git a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
index 763caa4..022a201 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_gtk.cc
@@ -12,7 +12,7 @@
#include "views/controls/textfield/textfield.h"
#if defined(TOUCH_UI)
-#include "app/keyboard_code_conversion_gtk.h"
+#include "ui/base/keycodes/keyboard_code_conversion_gtk.h"
#endif
views::Widget* DropdownBarHost::CreateHost() {
diff --git a/chrome/browser/ui/views/dropdown_bar_host_win.cc b/chrome/browser/ui/views/dropdown_bar_host_win.cc
index 99d12a9..f08db1d 100644
--- a/chrome/browser/ui/views/dropdown_bar_host_win.cc
+++ b/chrome/browser/ui/views/dropdown_bar_host_win.cc
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/views/dropdown_bar_host.h"
-#include "app/keyboard_code_conversion_win.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
#include "chrome/browser/ui/find_bar/find_bar_controller.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "ui/base/keycodes/keyboard_code_conversion_win.h"
#include "views/controls/scrollbar/native_scroll_bar.h"
#include "views/widget/widget_win.h"
diff --git a/chrome/browser/ui/views/extensions/extension_view.cc b/chrome/browser/ui/views/extensions/extension_view.cc
index f34b6ad..8fc7cde 100644
--- a/chrome/browser/ui/views/extensions/extension_view.cc
+++ b/chrome/browser/ui/views/extensions/extension_view.cc
@@ -180,7 +180,7 @@ void ExtensionView::PreferredSizeChanged() {
bool ExtensionView::SkipDefaultKeyEventProcessing(const views::KeyEvent& e) {
// Let the tab key event be processed by the renderer (instead of moving the
// focus to the next focusable view).
- return (e.GetKeyCode() == app::VKEY_TAB);
+ return (e.GetKeyCode() == ui::VKEY_TAB);
}
void ExtensionView::HandleMouseMove() {
diff --git a/chrome/browser/ui/views/find_bar_host.cc b/chrome/browser/ui/views/find_bar_host.cc
index ba2de8e..bfd74e3 100644
--- a/chrome/browser/ui/views/find_bar_host.cc
+++ b/chrome/browser/ui/views/find_bar_host.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/find_bar_host.h"
-#include "app/keyboard_codes.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
@@ -13,6 +12,7 @@
#include "chrome/browser/ui/view_ids.h"
#include "chrome/browser/ui/views/find_bar_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/focus/external_focus_tracker.h"
#include "views/focus/view_storage.h"
#include "views/widget/root_view.h"
@@ -47,13 +47,13 @@ bool FindBarHost::MaybeForwardKeyEventToWebpage(
}
switch (key_event.GetKeyCode()) {
- case app::VKEY_DOWN:
- case app::VKEY_UP:
- case app::VKEY_PRIOR:
- case app::VKEY_NEXT:
+ case ui::VKEY_DOWN:
+ case ui::VKEY_UP:
+ case ui::VKEY_PRIOR:
+ case ui::VKEY_NEXT:
break;
- case app::VKEY_HOME:
- case app::VKEY_END:
+ case ui::VKEY_HOME:
+ case ui::VKEY_END:
if (key_event.IsControlDown())
break;
// Fall through.
@@ -164,11 +164,11 @@ FindBarTesting* FindBarHost::GetFindBarTesting() {
// FindBarWin, views::AcceleratorTarget implementation:
bool FindBarHost::AcceleratorPressed(const views::Accelerator& accelerator) {
- app::KeyboardCode key = accelerator.GetKeyCode();
- if (key == app::VKEY_RETURN && accelerator.IsCtrlDown()) {
+ ui::KeyboardCode key = accelerator.GetKeyCode();
+ if (key == ui::VKEY_RETURN && accelerator.IsCtrlDown()) {
// Ctrl+Enter closes the Find session and navigates any link that is active.
find_bar_controller_->EndFindSession(FindBarController::kActivateSelection);
- } else if (key == app::VKEY_ESCAPE) {
+ } else if (key == ui::VKEY_ESCAPE) {
// This will end the Find session and hide the window, causing it to loose
// focus and in the process unregister us as the handler for the Escape
// accelerator through the FocusWillChange event.
@@ -288,13 +288,13 @@ void FindBarHost::RegisterAccelerators() {
DropdownBarHost::RegisterAccelerators();
// Register for Ctrl+Return.
- views::Accelerator escape(app::VKEY_RETURN, false, true, false);
+ views::Accelerator escape(ui::VKEY_RETURN, false, true, false);
focus_manager()->RegisterAccelerator(escape, this);
}
void FindBarHost::UnregisterAccelerators() {
// Unregister Ctrl+Return.
- views::Accelerator escape(app::VKEY_RETURN, false, true, false);
+ views::Accelerator escape(ui::VKEY_RETURN, false, true, false);
focus_manager()->UnregisterAccelerator(escape, this);
DropdownBarHost::UnregisterAccelerators();
diff --git a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
index cb3d364..8a3c402 100644
--- a/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
+++ b/chrome/browser/ui/views/find_bar_host_interactive_uitest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
@@ -16,6 +15,7 @@
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
#include "net/test/test_server.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/focus/focus_manager.h"
#include "views/view.h"
@@ -73,7 +73,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, CrashEscHandlers) {
// This used to crash until bug 1303709 was fixed.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_ESCAPE, false, false, false, false));
+ browser(), ui::VKEY_ESCAPE, false, false, false, false));
}
IN_PROC_BROWSER_TEST_F(FindInPageTest, FocusRestore) {
@@ -192,21 +192,21 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, PrepopulateRespectBlank) {
// Search for "a".
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_A, false, false, false, false));
+ browser(), ui::VKEY_A, false, false, false, false));
// We should find "a" here.
EXPECT_EQ(ASCIIToUTF16("a"), GetFindBarText());
// Delete "a".
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_BACK, false, false, false, false));
+ browser(), ui::VKEY_BACK, false, false, false, false));
// Validate we have cleared the text.
EXPECT_EQ(string16(), GetFindBarText());
// Close the Find box.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_ESCAPE, false, false, false, false));
+ browser(), ui::VKEY_ESCAPE, false, false, false, false));
// Show the Find bar.
browser()->GetFindBarController()->Show();
@@ -217,11 +217,11 @@ IN_PROC_BROWSER_TEST_F(FindInPageTest, PrepopulateRespectBlank) {
// Close the Find box.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_ESCAPE, false, false, false, false));
+ browser(), ui::VKEY_ESCAPE, false, false, false, false));
// Press F3 to trigger FindNext.
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
- browser(), app::VKEY_F3, false, false, false, false));
+ browser(), ui::VKEY_F3, false, false, false, false));
// After the Find box has been reopened, it should still have no prepopulate
// value.
diff --git a/chrome/browser/ui/views/find_bar_view.cc b/chrome/browser/ui/views/find_bar_view.cc
index 5b643fd..4272634 100644
--- a/chrome/browser/ui/views/find_bar_view.cc
+++ b/chrome/browser/ui/views/find_bar_view.cc
@@ -512,7 +512,7 @@ bool FindBarView::HandleKeyEvent(views::Textfield* sender,
if (find_bar_host()->MaybeForwardKeyEventToWebpage(key_event))
return true; // Handled, we are done!
- if (key_event.GetKeyCode() == app::VKEY_RETURN) {
+ if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
// Pressing Return/Enter starts the search (unless text box is empty).
string16 find_string = find_text_->text();
if (!find_string.empty()) {
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index a52745b..4ba5d41 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -620,13 +620,13 @@ bool BrowserView::GetAccelerator(int cmd_id, menus::Accelerator* accelerator) {
// anywhere so we need to check for them explicitly here.
switch (cmd_id) {
case IDC_CUT:
- *accelerator = views::Accelerator(app::VKEY_X, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_X, false, true, false);
return true;
case IDC_COPY:
- *accelerator = views::Accelerator(app::VKEY_C, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_C, false, true, false);
return true;
case IDC_PASTE:
- *accelerator = views::Accelerator(app::VKEY_V, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_V, false, true, false);
return true;
}
// Else, we retrieve the accelerator information from the accelerator table.
@@ -1213,7 +1213,7 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
#if defined(OS_WIN)
// As Alt+F4 is the close-app keyboard shortcut, it needs processing
// immediately.
- if (event.windowsKeyCode == app::VKEY_F4 &&
+ if (event.windowsKeyCode == ui::VKEY_F4 &&
event.modifiers == NativeWebKeyboardEvent::AltKey) {
DefWindowProc(event.os_event.hwnd, event.os_event.message,
event.os_event.wParam, event.os_event.lParam);
@@ -1238,7 +1238,7 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
views_event.IsAltDown());
#else
views::Accelerator accelerator(
- static_cast<app::KeyboardCode>(event.windowsKeyCode),
+ static_cast<ui::KeyboardCode>(event.windowsKeyCode),
(event.modifiers & NativeWebKeyboardEvent::ShiftKey) ==
NativeWebKeyboardEvent::ShiftKey,
(event.modifiers & NativeWebKeyboardEvent::ControlKey) ==
@@ -1306,34 +1306,34 @@ void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
// manager to do that.
#if !defined(OS_MACOSX)
void BrowserView::Cut() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_X,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_X,
true, false, false, false);
}
void BrowserView::Copy() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_C,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_C,
true, false, false, false);
}
void BrowserView::Paste() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_V,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_V,
true, false, false, false);
}
#else
// Mac versions. Not tested by antyhing yet;
// don't assume written == works.
void BrowserView::Cut() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_X,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_X,
false, false, false, true);
}
void BrowserView::Copy() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_C,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_C,
false, false, false, true);
}
void BrowserView::Paste() {
- ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_V,
+ ui_controls::SendKeyPress(GetNativeHandle(), ui::VKEY_V,
false, false, false, true);
}
#endif
@@ -2289,7 +2289,7 @@ void BrowserView::LoadAccelerators() {
bool ctrl_down = (accelerators[i].fVirt & FCONTROL) == FCONTROL;
bool shift_down = (accelerators[i].fVirt & FSHIFT) == FSHIFT;
views::Accelerator accelerator(
- static_cast<app::KeyboardCode>(accelerators[i].key),
+ static_cast<ui::KeyboardCode>(accelerators[i].key),
shift_down, ctrl_down, alt_down);
accelerator_table_[accelerator] = accelerators[i].cmd;
@@ -2448,53 +2448,53 @@ void BrowserView::UpdateAcceleratorMetrics(
#if defined(OS_CHROMEOS)
// Collect information about the relative popularity of various accelerators
// on Chrome OS.
- const app::KeyboardCode key_code = accelerator.GetKeyCode();
+ const ui::KeyboardCode key_code = accelerator.GetKeyCode();
switch (command_id) {
case IDC_BACK:
- if (key_code == app::VKEY_BACK)
+ if (key_code == ui::VKEY_BACK)
UserMetrics::RecordAction(UserMetricsAction("Accel_Back_Backspace"));
- else if (key_code == app::VKEY_F1)
+ else if (key_code == ui::VKEY_F1)
UserMetrics::RecordAction(UserMetricsAction("Accel_Back_F1"));
- else if (key_code == app::VKEY_LEFT)
+ else if (key_code == ui::VKEY_LEFT)
UserMetrics::RecordAction(UserMetricsAction("Accel_Back_Left"));
break;
case IDC_FORWARD:
- if (key_code == app::VKEY_BACK)
+ if (key_code == ui::VKEY_BACK)
UserMetrics::RecordAction(UserMetricsAction("Accel_Forward_Backspace"));
- else if (key_code == app::VKEY_F2)
+ else if (key_code == ui::VKEY_F2)
UserMetrics::RecordAction(UserMetricsAction("Accel_Forward_F2"));
- else if (key_code == app::VKEY_LEFT)
+ else if (key_code == ui::VKEY_LEFT)
UserMetrics::RecordAction(UserMetricsAction("Accel_Forward_Right"));
break;
case IDC_RELOAD:
case IDC_RELOAD_IGNORING_CACHE:
- if (key_code == app::VKEY_R)
+ if (key_code == ui::VKEY_R)
UserMetrics::RecordAction(UserMetricsAction("Accel_Reload_R"));
- else if (key_code == app::VKEY_F3)
+ else if (key_code == ui::VKEY_F3)
UserMetrics::RecordAction(UserMetricsAction("Accel_Reload_F3"));
break;
case IDC_FULLSCREEN:
- if (key_code == app::VKEY_F4)
+ if (key_code == ui::VKEY_F4)
UserMetrics::RecordAction(UserMetricsAction("Accel_Fullscreen_F4"));
break;
case IDC_NEW_TAB:
- if (key_code == app::VKEY_T)
+ if (key_code == ui::VKEY_T)
UserMetrics::RecordAction(UserMetricsAction("Accel_NewTab_T"));
break;
case IDC_SEARCH:
- if (key_code == app::VKEY_LWIN)
+ if (key_code == ui::VKEY_LWIN)
UserMetrics::RecordAction(UserMetricsAction("Accel_Search_LWin"));
break;
case IDC_FOCUS_LOCATION:
- if (key_code == app::VKEY_D)
+ if (key_code == ui::VKEY_D)
UserMetrics::RecordAction(UserMetricsAction("Accel_FocusLocation_D"));
- else if (key_code == app::VKEY_L)
+ else if (key_code == ui::VKEY_L)
UserMetrics::RecordAction(UserMetricsAction("Accel_FocusLocation_L"));
break;
case IDC_FOCUS_SEARCH:
- if (key_code == app::VKEY_E)
+ if (key_code == ui::VKEY_E)
UserMetrics::RecordAction(UserMetricsAction("Accel_FocusSearch_E"));
- else if (key_code == app::VKEY_K)
+ else if (key_code == ui::VKEY_K)
UserMetrics::RecordAction(UserMetricsAction("Accel_FocusSearch_K"));
break;
default:
diff --git a/chrome/browser/ui/views/fullscreen_exit_bubble.cc b/chrome/browser/ui/views/fullscreen_exit_bubble.cc
index d3f3910..2e59e6b 100644
--- a/chrome/browser/ui/views/fullscreen_exit_bubble.cc
+++ b/chrome/browser/ui/views/fullscreen_exit_bubble.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/fullscreen_exit_bubble.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/utf_string_conversions.h"
@@ -12,6 +11,7 @@
#include "gfx/canvas_skia.h"
#include "grit/generated_resources.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/screen.h"
#include "views/widget/root_view.h"
#include "views/window/window.h"
@@ -147,7 +147,7 @@ FullscreenExitBubble::FullscreenExitBubble(
size_animation_->Reset(1);
// Create the contents view.
- views::Accelerator accelerator(app::VKEY_UNKNOWN, false, false, false);
+ views::Accelerator accelerator(ui::VKEY_UNKNOWN, false, false, false);
bool got_accelerator = frame->GetAccelerator(IDC_FULLSCREEN, &accelerator);
DCHECK(got_accelerator);
view_ = new FullscreenExitView(
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index dd5c50a..32de496 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -4,11 +4,11 @@
#include "chrome/browser/ui/views/html_dialog_view.h"
-#include "app/keyboard_codes.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/views/window.h"
#include "chrome/common/native_web_keyboard_event.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
#include "views/window/window.h"
@@ -56,7 +56,7 @@ gfx::Size HtmlDialogView::GetPreferredSize() {
bool HtmlDialogView::AcceleratorPressed(const views::Accelerator& accelerator) {
// Pressing ESC closes the dialog.
- DCHECK_EQ(app::VKEY_ESCAPE, accelerator.GetKeyCode());
+ DCHECK_EQ(ui::VKEY_ESCAPE, accelerator.GetKeyCode());
OnDialogClosed(std::string());
return true;
}
@@ -214,7 +214,7 @@ void HtmlDialogView::InitDialog() {
this);
// Pressing the ESC key will close the dialog.
- AddAccelerator(views::Accelerator(app::VKEY_ESCAPE, false, false, false));
+ AddAccelerator(views::Accelerator(ui::VKEY_ESCAPE, false, false, false));
DOMView::LoadURL(GetDialogContentURL());
}
diff --git a/chrome/browser/ui/views/info_bubble.cc b/chrome/browser/ui/views/info_bubble.cc
index bb296f8..409d663 100644
--- a/chrome/browser/ui/views/info_bubble.cc
+++ b/chrome/browser/ui/views/info_bubble.cc
@@ -6,7 +6,6 @@
#include <vector>
-#include "app/keyboard_codes.h"
#include "chrome/browser/ui/window_sizer.h"
#include "chrome/common/notification_service.h"
#include "gfx/canvas_skia.h"
@@ -14,6 +13,7 @@
#include "gfx/path.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/fill_layout.h"
#include "views/widget/root_view.h"
#include "views/widget/widget.h"
@@ -449,7 +449,7 @@ void InfoBubble::Init(views::Widget* parent,
// Register the Escape accelerator for closing.
GetFocusManager()->RegisterAccelerator(
- views::Accelerator(app::VKEY_ESCAPE, false, false, false), this);
+ views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this);
// Done creating the bubble.
NotificationService::current()->Notify(NotificationType::INFO_BUBBLE_CREATED,
@@ -514,7 +514,7 @@ void InfoBubble::DoClose(bool closed_by_escape) {
return;
GetFocusManager()->UnregisterAccelerator(
- views::Accelerator(app::VKEY_ESCAPE, false, false, false), this);
+ views::Accelerator(ui::VKEY_ESCAPE, false, false, false), this);
if (delegate_)
delegate_->InfoBubbleClosing(this, closed_by_escape);
show_status_ = kClosed;
diff --git a/chrome/browser/ui/views/js_modal_dialog_views.cc b/chrome/browser/ui/views/js_modal_dialog_views.cc
index 429b442..8d95f14 100644
--- a/chrome/browser/ui/views/js_modal_dialog_views.cc
+++ b/chrome/browser/ui/views/js_modal_dialog_views.cc
@@ -4,13 +4,13 @@
#include "chrome/browser/ui/views/js_modal_dialog_views.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/message_box_flags.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/app_modal_dialogs/app_modal_dialog.h"
#include "chrome/browser/ui/views/window.h"
#include "grit/generated_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/controls/message_box_view.h"
#include "views/window/window.h"
@@ -26,7 +26,7 @@ JSModalDialogViews::JSModalDialogViews(
DCHECK(message_box_view_);
message_box_view_->AddAccelerator(
- views::Accelerator(app::VKEY_C, false, true, false));
+ views::Accelerator(ui::VKEY_C, false, true, false));
if (parent->display_suppress_checkbox()) {
message_box_view_->SetCheckBoxLabel(UTF16ToWide(
l10n_util::GetStringUTF16(IDS_JAVASCRIPT_MESSAGEBOX_SUPPRESS_OPTION)));
diff --git a/chrome/browser/ui/views/keyword_editor_view.cc b/chrome/browser/ui/views/keyword_editor_view.cc
index 2899495..9e3ec7c 100644
--- a/chrome/browser/ui/views/keyword_editor_view.cc
+++ b/chrome/browser/ui/views/keyword_editor_view.cc
@@ -170,7 +170,7 @@ void KeywordEditorView::Init() {
l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_NEW_BUTTON)));
add_button_->SetEnabled(controller_->loaded());
add_button_->AddAccelerator(
- views::Accelerator(app::VKEY_A, false, false, true));
+ views::Accelerator(ui::VKEY_A, false, false, true));
add_button_->SetAccessibleKeyboardShortcut(L"A");
edit_button_ = new views::NativeButton(this, UTF16ToWide(
@@ -181,7 +181,7 @@ void KeywordEditorView::Init() {
l10n_util::GetStringUTF16(IDS_SEARCH_ENGINES_EDITOR_REMOVE_BUTTON)));
remove_button_->SetEnabled(false);
remove_button_->AddAccelerator(
- views::Accelerator(app::VKEY_R, false, false, true));
+ views::Accelerator(ui::VKEY_R, false, false, true));
remove_button_->SetAccessibleKeyboardShortcut(L"R");
make_default_button_ = new views::NativeButton(
diff --git a/chrome/browser/ui/views/location_bar/page_action_image_view.cc b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
index 1156a6d..1612cf9 100644
--- a/chrome/browser/ui/views/location_bar/page_action_image_view.cc
+++ b/chrome/browser/ui/views/location_bar/page_action_image_view.cc
@@ -139,8 +139,8 @@ void PageActionImageView::OnMouseReleased(const views::MouseEvent& event,
}
bool PageActionImageView::OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_SPACE ||
- e.GetKeyCode() == app::VKEY_RETURN) {
+ if (e.GetKeyCode() == ui::VKEY_SPACE ||
+ e.GetKeyCode() == ui::VKEY_RETURN) {
ExecuteAction(1, false);
return true;
}
diff --git a/chrome/browser/ui/views/location_bar/star_view.cc b/chrome/browser/ui/views/location_bar/star_view.cc
index a52b1b6..2272810 100644
--- a/chrome/browser/ui/views/location_bar/star_view.cc
+++ b/chrome/browser/ui/views/location_bar/star_view.cc
@@ -59,8 +59,8 @@ void StarView::OnMouseReleased(const views::MouseEvent& event, bool canceled) {
}
bool StarView::OnKeyPressed(const views::KeyEvent& e) {
- if (e.GetKeyCode() == app::VKEY_SPACE ||
- e.GetKeyCode() == app::VKEY_RETURN) {
+ if (e.GetKeyCode() == ui::VKEY_SPACE ||
+ e.GetKeyCode() == ui::VKEY_RETURN) {
command_updater_->ExecuteCommand(IDC_BOOKMARK_PAGE);
return true;
}
diff --git a/chrome/browser/ui/views/options/cookies_view.cc b/chrome/browser/ui/views/options/cookies_view.cc
index cf436d0..64d79f5 100644
--- a/chrome/browser/ui/views/options/cookies_view.cc
+++ b/chrome/browser/ui/views/options/cookies_view.cc
@@ -146,9 +146,9 @@ void CookiesView::ContentsChanged(views::Textfield* sender,
bool CookiesView::HandleKeyEvent(views::Textfield* sender,
const views::KeyEvent& key_event) {
- if (key_event.GetKeyCode() == app::VKEY_ESCAPE) {
+ if (key_event.GetKeyCode() == ui::VKEY_ESCAPE) {
ResetSearchQuery();
- } else if (key_event.GetKeyCode() == app::VKEY_RETURN) {
+ } else if (key_event.GetKeyCode() == ui::VKEY_RETURN) {
search_update_factory_.RevokeAll();
UpdateSearchResults();
}
@@ -241,8 +241,8 @@ void CookiesView::OnTreeViewSelectionChanged(views::TreeView* tree_view) {
}
}
-void CookiesView::OnTreeViewKeyDown(app::KeyboardCode keycode) {
- if (keycode == app::VKEY_DELETE)
+void CookiesView::OnTreeViewKeyDown(ui::KeyboardCode keycode) {
+ if (keycode == ui::VKEY_DELETE)
cookies_tree_->RemoveSelectedItems();
}
diff --git a/chrome/browser/ui/views/options/cookies_view.h b/chrome/browser/ui/views/options/cookies_view.h
index af0d9ec..fbc8821 100644
--- a/chrome/browser/ui/views/options/cookies_view.h
+++ b/chrome/browser/ui/views/options/cookies_view.h
@@ -72,7 +72,7 @@ class CookiesView : public CookiesTreeModel::Observer,
virtual void OnTreeViewSelectionChanged(views::TreeView* tree_view);
// views::TreeViewController implementation.
- virtual void OnTreeViewKeyDown(app::KeyboardCode keycode);
+ virtual void OnTreeViewKeyDown(ui::KeyboardCode keycode);
// views::Textfield::Controller implementation.
virtual void ContentsChanged(views::Textfield* sender,
diff --git a/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc b/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
index a5ad31d..42a05e9 100644
--- a/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
+++ b/chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc
@@ -4,10 +4,10 @@
#include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h"
-#include "app/keyboard_codes.h"
#include "base/logging.h"
#include "chrome/app/chrome_command_ids.h"
#include "grit/generated_resources.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/accelerator.h"
#include "views/controls/menu/menu_2.h"
@@ -67,28 +67,28 @@ bool RenderViewContextMenuViews::GetAcceleratorForCommandId(
// that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do.
switch (command_id) {
case IDC_CONTENT_CONTEXT_UNDO:
- *accel = views::Accelerator(app::VKEY_Z, false, true, false);
+ *accel = views::Accelerator(ui::VKEY_Z, false, true, false);
return true;
case IDC_CONTENT_CONTEXT_REDO:
// TODO(jcampan): should it be Ctrl-Y?
- *accel = views::Accelerator(app::VKEY_Z, true, true, false);
+ *accel = views::Accelerator(ui::VKEY_Z, true, true, false);
return true;
case IDC_CONTENT_CONTEXT_CUT:
- *accel = views::Accelerator(app::VKEY_X, false, true, false);
+ *accel = views::Accelerator(ui::VKEY_X, false, true, false);
return true;
case IDC_CONTENT_CONTEXT_COPY:
- *accel = views::Accelerator(app::VKEY_C, false, true, false);
+ *accel = views::Accelerator(ui::VKEY_C, false, true, false);
return true;
case IDC_CONTENT_CONTEXT_PASTE:
- *accel = views::Accelerator(app::VKEY_V, false, true, false);
+ *accel = views::Accelerator(ui::VKEY_V, false, true, false);
return true;
case IDC_CONTENT_CONTEXT_SELECTALL:
- *accel = views::Accelerator(app::VKEY_A, false, true, false);
+ *accel = views::Accelerator(ui::VKEY_A, false, true, false);
return true;
default:
diff --git a/chrome/browser/ui/views/task_manager_view.cc b/chrome/browser/ui/views/task_manager_view.cc
index 4953308..e12dd20 100644
--- a/chrome/browser/ui/views/task_manager_view.cc
+++ b/chrome/browser/ui/views/task_manager_view.cc
@@ -233,7 +233,7 @@ class TaskManagerView : public views::View,
// views::TableViewObserver implementation.
virtual void OnSelectionChanged();
virtual void OnDoubleClick();
- virtual void OnKeyDown(app::KeyboardCode keycode);
+ virtual void OnKeyDown(ui::KeyboardCode keycode);
// views::LinkController implementation.
virtual void LinkActivated(views::Link* source, int event_flags);
@@ -384,7 +384,7 @@ void TaskManagerView::Init() {
}
kill_button_ = new views::NativeButton(
this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_TASK_MANAGER_KILL)));
- kill_button_->AddAccelerator(views::Accelerator(app::VKEY_E,
+ kill_button_->AddAccelerator(views::Accelerator(ui::VKEY_E,
false, false, false));
kill_button_->SetAccessibleKeyboardShortcut(L"E");
about_memory_link_ = new views::Link(UTF16ToWide(
@@ -600,8 +600,8 @@ void TaskManagerView::OnDoubleClick() {
ActivateFocusedTab();
}
-void TaskManagerView::OnKeyDown(app::KeyboardCode keycode) {
- if (keycode == app::VKEY_RETURN)
+void TaskManagerView::OnKeyDown(ui::KeyboardCode keycode) {
+ if (keycode == ui::VKEY_RETURN)
ActivateFocusedTab();
}
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index dca962e..38ab6e5 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -460,13 +460,13 @@ bool ToolbarView::GetAcceleratorForCommandId(int command_id,
// TODO(cpu) Bug 1109102. Query WebKit land for the actual bindings.
switch (command_id) {
case IDC_CUT:
- *accelerator = views::Accelerator(app::VKEY_X, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_X, false, true, false);
return true;
case IDC_COPY:
- *accelerator = views::Accelerator(app::VKEY_C, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_C, false, true, false);
return true;
case IDC_PASTE:
- *accelerator = views::Accelerator(app::VKEY_V, false, true, false);
+ *accelerator = views::Accelerator(ui::VKEY_V, false, true, false);
return true;
}
// Else, we retrieve the accelerator information from the frame.
diff --git a/chrome/browser/ui/views/unhandled_keyboard_event_handler.cc b/chrome/browser/ui/views/unhandled_keyboard_event_handler.cc
index b31b9f6..02eda65 100644
--- a/chrome/browser/ui/views/unhandled_keyboard_event_handler.cc
+++ b/chrome/browser/ui/views/unhandled_keyboard_event_handler.cc
@@ -34,7 +34,7 @@ void UnhandledKeyboardEventHandler::HandleKeyboardEvent(
if (event.type == WebKit::WebInputEvent::RawKeyDown) {
views::Accelerator accelerator(
- static_cast<app::KeyboardCode>(event.windowsKeyCode),
+ static_cast<ui::KeyboardCode>(event.windowsKeyCode),
(event.modifiers & NativeWebKeyboardEvent::ShiftKey) ==
NativeWebKeyboardEvent::ShiftKey,
(event.modifiers & NativeWebKeyboardEvent::ControlKey) ==
diff --git a/chrome/browser/ui/views/url_picker.cc b/chrome/browser/ui/views/url_picker.cc
index e020de3..b7bfd0e 100644
--- a/chrome/browser/ui/views/url_picker.cc
+++ b/chrome/browser/ui/views/url_picker.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/url_picker.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "app/table_model.h"
@@ -20,6 +19,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "net/base/net_util.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/background.h"
#include "views/controls/label.h"
#include "views/controls/table/table_view.h"
@@ -113,7 +113,7 @@ UrlPicker::UrlPicker(UrlPickerDelegate* delegate,
layout->AddPaddingRow(0, kRelatedControlVerticalSpacing);
- AddAccelerator(views::Accelerator(app::VKEY_RETURN, false, false, false));
+ AddAccelerator(views::Accelerator(ui::VKEY_RETURN, false, false, false));
}
UrlPicker::~UrlPicker() {
diff --git a/chrome/common/automation_messages_internal.h b/chrome/common/automation_messages_internal.h
index 23249da..ac3fd77 100644
--- a/chrome/common/automation_messages_internal.h
+++ b/chrome/common/automation_messages_internal.h
@@ -364,7 +364,7 @@ IPC_MESSAGE_CONTROL3(AutomationMsg_WindowClick,
// This message requests that a key press be performed.
// Request:
// int - the handle of the window that's the context for this click
-// int - the app::KeyboardCode of the key that was pressed.
+// int - the ui::KeyboardCode of the key that was pressed.
// int - the flags which identify the modifiers (shift, ctrl, alt)
// associated for, as defined in chrome/views/event.h
IPC_MESSAGE_CONTROL3(AutomationMsg_WindowKeyPress,
diff --git a/chrome/renderer/autofill_helper.cc b/chrome/renderer/autofill_helper.cc
index 092555f..b383504 100644
--- a/chrome/renderer/autofill_helper.cc
+++ b/chrome/renderer/autofill_helper.cc
@@ -4,7 +4,6 @@
#include "chrome/renderer/autofill_helper.h"
-#include "app/keyboard_codes.h"
#include "app/l10n_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/common/chrome_constants.h"
@@ -16,6 +15,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputElement.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form.h"
@@ -219,8 +219,8 @@ void AutoFillHelper::TextDidChangeInTextField(const WebInputElement& element) {
void AutoFillHelper::KeyDownInTextField(const WebInputElement& element,
const WebKeyboardEvent& event) {
- if (event.windowsKeyCode == app::VKEY_DOWN ||
- event.windowsKeyCode == app::VKEY_UP)
+ if (event.windowsKeyCode == ui::VKEY_DOWN ||
+ event.windowsKeyCode == ui::VKEY_UP)
ShowSuggestions(element, true, true, true);
}
diff --git a/chrome/renderer/password_autocomplete_manager.cc b/chrome/renderer/password_autocomplete_manager.cc
index 613a0b4..a18f9b8 100644
--- a/chrome/renderer/password_autocomplete_manager.cc
+++ b/chrome/renderer/password_autocomplete_manager.cc
@@ -4,7 +4,6 @@
#include "chrome/renderer/password_autocomplete_manager.h"
-#include "app/keyboard_codes.h"
#include "base/message_loop.h"
#include "base/scoped_ptr.h"
#include "chrome/common/render_messages.h"
@@ -17,6 +16,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/password_form.h"
#include "webkit/glue/password_form_dom_manager.h"
@@ -303,7 +303,7 @@ void PasswordAutocompleteManager::TextFieldHandlingKeyDown(
int win_key_code = event.windowsKeyCode;
iter->second.backspace_pressed_last =
- (win_key_code == app::VKEY_BACK || win_key_code == app::VKEY_DELETE);
+ (win_key_code == ui::VKEY_BACK || win_key_code == ui::VKEY_DELETE);
}
bool PasswordAutocompleteManager::FillPassword(
diff --git a/chrome/renderer/password_autocomplete_manager_unittest.cc b/chrome/renderer/password_autocomplete_manager_unittest.cc
index 453441a..fd6546f 100644
--- a/chrome/renderer/password_autocomplete_manager_unittest.cc
+++ b/chrome/renderer/password_autocomplete_manager_unittest.cc
@@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "chrome/renderer/password_autocomplete_manager.h"
@@ -15,6 +14,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
@@ -124,7 +124,7 @@ class PasswordAutocompleteManagerTest : public RenderViewTest {
}
void SimulateKeyDownEvent(const WebInputElement& element,
- app::KeyboardCode key_code) {
+ ui::KeyboardCode key_code) {
WebKit::WebKeyboardEvent key_event;
key_event.windowsKeyCode = key_code;
view_->textFieldDidReceiveKeyDown(element, key_event);
@@ -280,12 +280,12 @@ TEST_F(PasswordAutocompleteManagerTest, InlineAutocomplete) {
CheckUsernameSelection(2, 5);
// Test that deleting does not trigger autocomplete.
- SimulateKeyDownEvent(username_element_, app::VKEY_BACK);
+ SimulateKeyDownEvent(username_element_, ui::VKEY_BACK);
SimulateUsernameChange("alic", true);
CheckTextFieldsState("alic", false, "", false);
CheckUsernameSelection(4, 4); // No selection.
// Reset the last pressed key to something other than backspace.
- SimulateKeyDownEvent(username_element_, app::VKEY_A);
+ SimulateKeyDownEvent(username_element_, ui::VKEY_A);
// Now lets say the user goes astray from the stored username and types the
// letter 'f', spelling 'alf'. We don't know alf (that's just sad), so in
diff --git a/chrome/renderer/render_view_browsertest.cc b/chrome/renderer/render_view_browsertest.cc
index ad145e7..379407d 100644
--- a/chrome/renderer/render_view_browsertest.cc
+++ b/chrome/renderer/render_view_browsertest.cc
@@ -4,7 +4,6 @@
#include "base/basictypes.h"
-#include "app/keyboard_codes.h"
#include "base/file_util.h"
#include "base/shared_memory.h"
#include "base/string_util.h"
@@ -25,6 +24,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/form_data.h"
#include "webkit/glue/form_field.h"
#include "webkit/glue/web_io_operators.h"
@@ -643,20 +643,20 @@ TEST_F(RenderViewTest, OnHandleKeyboardEvent) {
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z',
- app::VKEY_OEM_1,
- app::VKEY_OEM_PLUS,
- app::VKEY_OEM_COMMA,
- app::VKEY_OEM_MINUS,
- app::VKEY_OEM_PERIOD,
- app::VKEY_OEM_2,
- app::VKEY_OEM_3,
- app::VKEY_OEM_4,
- app::VKEY_OEM_5,
- app::VKEY_OEM_6,
- app::VKEY_OEM_7,
+ ui::VKEY_OEM_1,
+ ui::VKEY_OEM_PLUS,
+ ui::VKEY_OEM_COMMA,
+ ui::VKEY_OEM_MINUS,
+ ui::VKEY_OEM_PERIOD,
+ ui::VKEY_OEM_2,
+ ui::VKEY_OEM_3,
+ ui::VKEY_OEM_4,
+ ui::VKEY_OEM_5,
+ ui::VKEY_OEM_6,
+ ui::VKEY_OEM_7,
#if defined(OS_WIN)
// Not sure how to handle this key on Linux.
- app::VKEY_OEM_8,
+ ui::VKEY_OEM_8,
#endif
};
@@ -884,20 +884,20 @@ TEST_F(RenderViewTest, InsertCharacters) {
'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
'W', 'X', 'Y', 'Z',
- app::VKEY_OEM_1,
- app::VKEY_OEM_PLUS,
- app::VKEY_OEM_COMMA,
- app::VKEY_OEM_MINUS,
- app::VKEY_OEM_PERIOD,
- app::VKEY_OEM_2,
- app::VKEY_OEM_3,
- app::VKEY_OEM_4,
- app::VKEY_OEM_5,
- app::VKEY_OEM_6,
- app::VKEY_OEM_7,
+ ui::VKEY_OEM_1,
+ ui::VKEY_OEM_PLUS,
+ ui::VKEY_OEM_COMMA,
+ ui::VKEY_OEM_MINUS,
+ ui::VKEY_OEM_PERIOD,
+ ui::VKEY_OEM_2,
+ ui::VKEY_OEM_3,
+ ui::VKEY_OEM_4,
+ ui::VKEY_OEM_5,
+ ui::VKEY_OEM_6,
+ ui::VKEY_OEM_7,
#if defined(OS_WIN)
// Unclear how to handle this on Linux.
- app::VKEY_OEM_8,
+ ui::VKEY_OEM_8,
#endif
};
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.cc b/chrome/test/automated_ui_tests/automated_ui_tests.cc
index e4293ce..93731b1 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.cc
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.cc
@@ -6,7 +6,6 @@
#include <string>
#include <vector>
-#include "app/keyboard_codes.h"
#include "base/command_line.h"
#include "base/environment.h"
#include "base/file_util.h"
@@ -32,6 +31,7 @@
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#if defined(TOOLKIT_VIEWS)
#include "views/view.h"
@@ -487,35 +487,35 @@ bool AutomatedUITest::Options() {
}
bool AutomatedUITest::PressDownArrow() {
- return SimulateKeyPressInActiveWindow(app::VKEY_DOWN, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_DOWN, 0);
}
bool AutomatedUITest::PressEnterKey() {
- return SimulateKeyPressInActiveWindow(app::VKEY_RETURN, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_RETURN, 0);
}
bool AutomatedUITest::PressEscapeKey() {
- return SimulateKeyPressInActiveWindow(app::VKEY_ESCAPE, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_ESCAPE, 0);
}
bool AutomatedUITest::PressPageDown() {
- return SimulateKeyPressInActiveWindow(app::VKEY_PRIOR, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_PRIOR, 0);
}
bool AutomatedUITest::PressPageUp() {
- return SimulateKeyPressInActiveWindow(app::VKEY_NEXT, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_NEXT, 0);
}
bool AutomatedUITest::PressSpaceBar() {
- return SimulateKeyPressInActiveWindow(app::VKEY_SPACE, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_SPACE, 0);
}
bool AutomatedUITest::PressTabKey() {
- return SimulateKeyPressInActiveWindow(app::VKEY_TAB, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_TAB, 0);
}
bool AutomatedUITest::PressUpArrow() {
- return SimulateKeyPressInActiveWindow(app::VKEY_UP, 0);
+ return SimulateKeyPressInActiveWindow(ui::VKEY_UP, 0);
}
bool AutomatedUITest::StarPage() {
@@ -605,7 +605,7 @@ bool AutomatedUITest::ForceCrash() {
return true;
}
-bool AutomatedUITest::SimulateKeyPressInActiveWindow(app::KeyboardCode key,
+bool AutomatedUITest::SimulateKeyPressInActiveWindow(ui::KeyboardCode key,
int flags) {
scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
if (window.get() == NULL) {
diff --git a/chrome/test/automated_ui_tests/automated_ui_tests.h b/chrome/test/automated_ui_tests/automated_ui_tests.h
index ef7b1f3..e6345e9 100644
--- a/chrome/test/automated_ui_tests/automated_ui_tests.h
+++ b/chrome/test/automated_ui_tests/automated_ui_tests.h
@@ -103,9 +103,9 @@
#include <string>
-#include "app/keyboard_codes.h"
#include "chrome/test/automated_ui_tests/automated_ui_test_base.h"
#include "chrome/test/ui/ui_test.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace base {
class Time;
@@ -295,7 +295,7 @@ class AutomatedUITest : public AutomatedUITestBase {
// Calls SimulateOSKeyPress on the active window. Simulates a key press at
// the OS level. |key| is the key pressed and |flags| specifies which
// modifiers keys are also pressed (as defined in chrome/views/event.h).
- bool SimulateKeyPressInActiveWindow(app::KeyboardCode key, int flags);
+ bool SimulateKeyPressInActiveWindow(ui::KeyboardCode key, int flags);
// Opens init file, reads it into the reader, and closes the file.
// Returns false if there are any errors.
diff --git a/chrome/test/automation/window_proxy.cc b/chrome/test/automation/window_proxy.cc
index 3230c08..775c27c 100644
--- a/chrome/test/automation/window_proxy.cc
+++ b/chrome/test/automation/window_proxy.cc
@@ -40,7 +40,7 @@ bool WindowProxy::GetWindowTitle(string16* text) {
return sender_->Send(new AutomationMsg_WindowTitle(handle_, text));
}
-bool WindowProxy::SimulateOSKeyPress(app::KeyboardCode key, int flags) {
+bool WindowProxy::SimulateOSKeyPress(ui::KeyboardCode key, int flags) {
if (!is_valid()) return false;
return sender_->Send(
diff --git a/chrome/test/automation/window_proxy.h b/chrome/test/automation/window_proxy.h
index 27b87d4..dab17f6 100644
--- a/chrome/test/automation/window_proxy.h
+++ b/chrome/test/automation/window_proxy.h
@@ -12,10 +12,10 @@
#include <windows.h>
#endif
-#include "app/keyboard_codes.h"
#include "base/string16.h"
#include "base/threading/thread.h"
#include "chrome/test/automation/automation_handle_tracker.h"
+#include "ui/base/keycodes/keyboard_codes.h"
class BrowserProxy;
class WindowProxy;
@@ -54,7 +54,7 @@ class WindowProxy : public AutomationResourceProxy {
// key pressed and |flags| specifies which modifiers keys are also pressed (as
// defined in chrome/views/event.h). Note that this actually sends the event
// to the window that has focus.
- bool SimulateOSKeyPress(app::KeyboardCode key, int flags);
+ bool SimulateOSKeyPress(ui::KeyboardCode key, int flags);
// Shows/hides the window and as a result makes it active/inactive.
// Returns true if the call was successful.
diff --git a/chrome/test/interactive_ui/keyboard_access_uitest.cc b/chrome/test/interactive_ui/keyboard_access_uitest.cc
index 4bb92a8..fe80efc 100644
--- a/chrome/test/interactive_ui/keyboard_access_uitest.cc
+++ b/chrome/test/interactive_ui/keyboard_access_uitest.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "app/keyboard_codes.h"
#include "chrome/test/automation/browser_proxy.h"
#include "chrome/test/automation/tab_proxy.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/ui_test.h"
#include "googleurl/src/gurl.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "views/event.h"
// This functionality currently works on Windows and on Linux when
@@ -60,12 +60,12 @@ void KeyboardAccessTest::TestMenuKeyboardAccess(bool alternate_key_sequence,
int original_view_id = -1;
ASSERT_TRUE(window->GetFocusedViewID(&original_view_id));
- app::KeyboardCode menu_key =
- alternate_key_sequence ? app::VKEY_MENU : app::VKEY_F10;
+ ui::KeyboardCode menu_key =
+ alternate_key_sequence ? ui::VKEY_MENU : ui::VKEY_F10;
#if defined(OS_CHROMEOS)
// Chrome OS has different function key accelerators, so we always use the
// menu key there.
- menu_key = app::VKEY_MENU;
+ menu_key = ui::VKEY_MENU;
#endif
ASSERT_TRUE(window->SimulateOSKeyPress(menu_key, modifiers));
@@ -86,16 +86,16 @@ void KeyboardAccessTest::TestMenuKeyboardAccess(bool alternate_key_sequence,
ASSERT_TRUE(browser->StartTrackingPopupMenus());
if (alternate_key_sequence)
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_DOWN, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_DOWN, 0));
else
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_RETURN, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_RETURN, 0));
// Wait until the popup menu actually opens.
ASSERT_TRUE(browser->WaitForPopupMenuToOpen());
// Press DOWN to select the first item, then RETURN to select it.
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_DOWN, 0));
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_RETURN, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_DOWN, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_RETURN, 0));
// Wait for the new tab to appear.
ASSERT_TRUE(browser->WaitForTabCountToBecome(2));
@@ -153,13 +153,13 @@ TEST_F(KeyboardAccessTest, MAYBE_ReserveKeyboardAccelerators) {
scoped_refptr<WindowProxy> window(browser->GetWindow());
ASSERT_TRUE(window);
ASSERT_TRUE(window->SimulateOSKeyPress(
- app::VKEY_TAB, views::Event::EF_CONTROL_DOWN));
+ ui::VKEY_TAB, views::Event::EF_CONTROL_DOWN));
ASSERT_TRUE(browser->WaitForTabToBecomeActive(0, action_max_timeout_ms()));
#if !defined(OS_MACOSX) // see BrowserWindowCocoa::GetCommandId
ASSERT_TRUE(browser->ActivateTab(1));
ASSERT_TRUE(window->SimulateOSKeyPress(
- app::VKEY_F4, views::Event::EF_CONTROL_DOWN));
+ ui::VKEY_F4, views::Event::EF_CONTROL_DOWN));
ASSERT_TRUE(browser->WaitForTabCountToBecome(1));
#endif
}
diff --git a/chrome/test/interactive_ui/npapi_interactive_test.cc b/chrome/test/interactive_ui/npapi_interactive_test.cc
index c5a7884..725e3a1 100644
--- a/chrome/test/interactive_ui/npapi_interactive_test.cc
+++ b/chrome/test/interactive_ui/npapi_interactive_test.cc
@@ -1,42 +1,17 @@
-// Copyright 2008, Google Inc.
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Copyright (c) 2011 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.
//
// NPAPI interactive UI tests.
//
-#include "app/keyboard_codes.h"
#include "base/file_path.h"
#include "chrome/browser/net/url_request_mock_http_job.h"
#include "chrome/test/automation/window_proxy.h"
#include "chrome/test/ui/npapi_test_helper.h"
#include "chrome/test/ui_test_utils.h"
+#include "ui/base/keycodes/keyboard_codes.h"
const char kTestCompleteCookie[] = "status";
const char kTestCompleteSuccess[] = "OK";
@@ -80,7 +55,7 @@ TEST_F(NPAPIVisiblePluginTester, FLAKY_GetURLRequest404Response) {
automation()->WaitForAppModalDialog();
scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
ASSERT_TRUE(window.get());
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_ESCAPE, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_ESCAPE, 0));
WaitForFinish("geturl_404_response", "1", url, kTestCompleteCookie,
kTestCompleteSuccess, action_max_timeout_ms());
@@ -99,7 +74,7 @@ TEST_F(NPAPIVisiblePluginTester, DISABLED_SelfDeletePluginInvokeAlert) {
ASSERT_TRUE(automation()->WaitForAppModalDialog());
scoped_refptr<WindowProxy> window(automation()->GetActiveWindow());
ASSERT_TRUE(window.get());
- ASSERT_TRUE(window->SimulateOSKeyPress(app::VKEY_ESCAPE, 0));
+ ASSERT_TRUE(window->SimulateOSKeyPress(ui::VKEY_ESCAPE, 0));
WaitForFinish("self_delete_plugin_invoke_alert", "1", url,
kTestCompleteCookie, kTestCompleteSuccess,
diff --git a/chrome/test/reliability/page_load_test.cc b/chrome/test/reliability/page_load_test.cc
index 19406fb..1d3777d 100644
--- a/chrome/test/reliability/page_load_test.cc
+++ b/chrome/test/reliability/page_load_test.cc
@@ -37,7 +37,6 @@
#include <fstream>
#include <vector>
-#include "app/keyboard_codes.h"
#include "base/command_line.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -69,6 +68,7 @@
#include "chrome/test/reliability/page_load_test.h"
#include "chrome/test/ui/ui_test.h"
#include "net/base/net_util.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "v8/include/v8-testing.h"
namespace {
@@ -233,9 +233,9 @@ class PageLoadTest : public UITest {
// Sleep for 2 seconds between commands.
// This used to be settable but the flag went away.
int sleep_time_ms = 2000;
- window->SimulateOSKeyPress(app::VKEY_NEXT, 0);
+ window->SimulateOSKeyPress(ui::VKEY_NEXT, 0);
base::PlatformThread::Sleep(sleep_time_ms);
- window->SimulateOSKeyPress(app::VKEY_NEXT, 0);
+ window->SimulateOSKeyPress(ui::VKEY_NEXT, 0);
base::PlatformThread::Sleep(sleep_time_ms);
}
}
diff --git a/chrome/test/render_view_test.cc b/chrome/test/render_view_test.cc
index 123304d..47a7c53 100644
--- a/chrome/test/render_view_test.cc
+++ b/chrome/test/render_view_test.cc
@@ -206,7 +206,7 @@ int RenderViewTest::SendKeyEvent(MockKeyboard::Layout layout,
// current locale. TODO(estade): fix this to respect |layout|.
std::vector<GdkEvent*> events;
app::SynthesizeKeyPressEvents(
- NULL, static_cast<app::KeyboardCode>(key_code),
+ NULL, static_cast<ui::KeyboardCode>(key_code),
modifiers & (MockKeyboard::LEFT_CONTROL | MockKeyboard::RIGHT_CONTROL),
modifiers & (MockKeyboard::LEFT_SHIFT | MockKeyboard::RIGHT_SHIFT),
modifiers & (MockKeyboard::LEFT_ALT | MockKeyboard::RIGHT_ALT),
diff --git a/chrome/test/ui_test_utils.cc b/chrome/test/ui_test_utils.cc
index 0618011..ad6d8c9 100644
--- a/chrome/test/ui_test_utils.cc
+++ b/chrome/test/ui_test_utils.cc
@@ -699,7 +699,7 @@ Browser* GetBrowserNotInSet(std::set<Browser*> excluded_browsers) {
}
bool SendKeyPressSync(const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
@@ -724,7 +724,7 @@ bool SendKeyPressSync(const Browser* browser,
}
bool SendKeyPressAndWait(const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h
index a0deb1c..ad661e9 100644
--- a/chrome/test/ui_test_utils.h
+++ b/chrome/test/ui_test_utils.h
@@ -11,7 +11,6 @@
#include <string>
#include <set>
-#include "app/keyboard_codes.h"
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "base/scoped_temp_dir.h"
@@ -24,6 +23,7 @@
#include "chrome/test/automation/dom_element_proxy.h"
#include "gfx/native_widget_types.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/base/keycodes/keyboard_codes.h"
#include "webkit/glue/window_open_disposition.h"
class AppModalDialog;
@@ -257,7 +257,7 @@ Browser* GetBrowserNotInSet(std::set<Browser*> excluded_browsers);
// out. This uses ui_controls::SendKeyPress, see it for details. Returns true
// if the event was successfully sent and received.
bool SendKeyPressSync(const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
@@ -268,7 +268,7 @@ bool SendKeyPressSync(const Browser* browser,
// ui_controls::SendKeyPress, see it for details. Returns true if the event was
// successfully sent and both the event and notification were received.
bool SendKeyPressAndWait(const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
@@ -480,7 +480,7 @@ class WindowedNotificationObserverWithDetails
template <class U>
bool SendKeyPressAndWaitWithDetails(
const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
@@ -492,7 +492,7 @@ bool SendKeyPressAndWaitWithDetails(
template <class U>
bool SendKeyPressAndWaitWithDetails(
const Browser* browser,
- app::KeyboardCode key,
+ ui::KeyboardCode key,
bool control,
bool shift,
bool alt,
diff --git a/chrome/test/webdriver/keymap.cc b/chrome/test/webdriver/keymap.cc
index 1ab0a31..bb08457 100644
--- a/chrome/test/webdriver/keymap.cc
+++ b/chrome/test/webdriver/keymap.cc
@@ -14,132 +14,132 @@ KeyMap::KeyMap() {
// 0xE000-0xF8FF.
// Special WebDriver NULL key; clears all modifiers.
- keys_[L'\uE000'] = app::VKEY_UNKNOWN;
-
- keys_[L'\uE001'] = app::VKEY_UNKNOWN; // TODO(jmikhail): CANCEL
- keys_[L'\uE002'] = app::VKEY_HELP;
- keys_[L'\uE003'] = app::VKEY_BACK; // BACKSPACE
- keys_[L'\uE004'] = app::VKEY_TAB;
- keys_[L'\uE005'] = app::VKEY_CLEAR;
- keys_[L'\uE006'] = app::VKEY_RETURN;
- keys_[L'\uE007'] = app::VKEY_UNKNOWN; // TODO(jmikhail): ENTER
- keys_[L'\uE008'] = app::VKEY_SHIFT;
- keys_[L'\uE009'] = app::VKEY_CONTROL;
- keys_[L'\uE00A'] = app::VKEY_MENU; // ALT
- keys_[L'\uE00B'] = app::VKEY_PAUSE;
- keys_[L'\uE00C'] = app::VKEY_ESCAPE;
- keys_[L'\uE00D'] = app::VKEY_SPACE;
- keys_[L'\uE00E'] = app::VKEY_PRIOR; // PAGEUP
- keys_[L'\uE00F'] = app::VKEY_NEXT; // PAGEDOWN
- keys_[L'\uE010'] = app::VKEY_END;
- keys_[L'\uE011'] = app::VKEY_HOME;
- keys_[L'\uE012'] = app::VKEY_LEFT;
- keys_[L'\uE013'] = app::VKEY_UP;
- keys_[L'\uE014'] = app::VKEY_RIGHT;
- keys_[L'\uE015'] = app::VKEY_DOWN;
- keys_[L'\uE016'] = app::VKEY_INSERT;
- keys_[L'\uE017'] = app::VKEY_DELETE;
-
- keys_[L'\uE01A'] = app::VKEY_NUMPAD0;
- keys_[L'\uE01B'] = app::VKEY_NUMPAD1;
- keys_[L'\uE01C'] = app::VKEY_NUMPAD2;
- keys_[L'\uE01D'] = app::VKEY_NUMPAD3;
- keys_[L'\uE01E'] = app::VKEY_NUMPAD4;
- keys_[L'\uE01F'] = app::VKEY_NUMPAD5;
- keys_[L'\uE020'] = app::VKEY_NUMPAD6;
- keys_[L'\uE021'] = app::VKEY_NUMPAD7;
- keys_[L'\uE022'] = app::VKEY_NUMPAD8;
- keys_[L'\uE023'] = app::VKEY_NUMPAD9;
- keys_[L'\uE024'] = app::VKEY_MULTIPLY;
- keys_[L'\uE025'] = app::VKEY_ADD;
- keys_[L'\uE026'] = app::VKEY_SEPARATOR;
- keys_[L'\uE027'] = app::VKEY_SUBTRACT;
- keys_[L'\uE028'] = app::VKEY_DECIMAL;
- keys_[L'\uE029'] = app::VKEY_DIVIDE;
-
- keys_[L'\uE031'] = app::VKEY_F1;
- keys_[L'\uE032'] = app::VKEY_F2;
- keys_[L'\uE033'] = app::VKEY_F3;
- keys_[L'\uE034'] = app::VKEY_F4;
- keys_[L'\uE035'] = app::VKEY_F5;
- keys_[L'\uE036'] = app::VKEY_F6;
- keys_[L'\uE037'] = app::VKEY_F7;
- keys_[L'\uE038'] = app::VKEY_F8;
- keys_[L'\uE039'] = app::VKEY_F9;
- keys_[L'\uE03A'] = app::VKEY_F10;
- keys_[L'\uE03B'] = app::VKEY_F11;
- keys_[L'\uE03C'] = app::VKEY_F12;
+ keys_[L'\uE000'] = ui::VKEY_UNKNOWN;
+
+ keys_[L'\uE001'] = ui::VKEY_UNKNOWN; // TODO(jmikhail): CANCEL
+ keys_[L'\uE002'] = ui::VKEY_HELP;
+ keys_[L'\uE003'] = ui::VKEY_BACK; // BACKSPACE
+ keys_[L'\uE004'] = ui::VKEY_TAB;
+ keys_[L'\uE005'] = ui::VKEY_CLEAR;
+ keys_[L'\uE006'] = ui::VKEY_RETURN;
+ keys_[L'\uE007'] = ui::VKEY_UNKNOWN; // TODO(jmikhail): ENTER
+ keys_[L'\uE008'] = ui::VKEY_SHIFT;
+ keys_[L'\uE009'] = ui::VKEY_CONTROL;
+ keys_[L'\uE00A'] = ui::VKEY_MENU; // ALT
+ keys_[L'\uE00B'] = ui::VKEY_PAUSE;
+ keys_[L'\uE00C'] = ui::VKEY_ESCAPE;
+ keys_[L'\uE00D'] = ui::VKEY_SPACE;
+ keys_[L'\uE00E'] = ui::VKEY_PRIOR; // PAGEUP
+ keys_[L'\uE00F'] = ui::VKEY_NEXT; // PAGEDOWN
+ keys_[L'\uE010'] = ui::VKEY_END;
+ keys_[L'\uE011'] = ui::VKEY_HOME;
+ keys_[L'\uE012'] = ui::VKEY_LEFT;
+ keys_[L'\uE013'] = ui::VKEY_UP;
+ keys_[L'\uE014'] = ui::VKEY_RIGHT;
+ keys_[L'\uE015'] = ui::VKEY_DOWN;
+ keys_[L'\uE016'] = ui::VKEY_INSERT;
+ keys_[L'\uE017'] = ui::VKEY_DELETE;
+
+ keys_[L'\uE01A'] = ui::VKEY_NUMPAD0;
+ keys_[L'\uE01B'] = ui::VKEY_NUMPAD1;
+ keys_[L'\uE01C'] = ui::VKEY_NUMPAD2;
+ keys_[L'\uE01D'] = ui::VKEY_NUMPAD3;
+ keys_[L'\uE01E'] = ui::VKEY_NUMPAD4;
+ keys_[L'\uE01F'] = ui::VKEY_NUMPAD5;
+ keys_[L'\uE020'] = ui::VKEY_NUMPAD6;
+ keys_[L'\uE021'] = ui::VKEY_NUMPAD7;
+ keys_[L'\uE022'] = ui::VKEY_NUMPAD8;
+ keys_[L'\uE023'] = ui::VKEY_NUMPAD9;
+ keys_[L'\uE024'] = ui::VKEY_MULTIPLY;
+ keys_[L'\uE025'] = ui::VKEY_ADD;
+ keys_[L'\uE026'] = ui::VKEY_SEPARATOR;
+ keys_[L'\uE027'] = ui::VKEY_SUBTRACT;
+ keys_[L'\uE028'] = ui::VKEY_DECIMAL;
+ keys_[L'\uE029'] = ui::VKEY_DIVIDE;
+
+ keys_[L'\uE031'] = ui::VKEY_F1;
+ keys_[L'\uE032'] = ui::VKEY_F2;
+ keys_[L'\uE033'] = ui::VKEY_F3;
+ keys_[L'\uE034'] = ui::VKEY_F4;
+ keys_[L'\uE035'] = ui::VKEY_F5;
+ keys_[L'\uE036'] = ui::VKEY_F6;
+ keys_[L'\uE037'] = ui::VKEY_F7;
+ keys_[L'\uE038'] = ui::VKEY_F8;
+ keys_[L'\uE039'] = ui::VKEY_F9;
+ keys_[L'\uE03A'] = ui::VKEY_F10;
+ keys_[L'\uE03B'] = ui::VKEY_F11;
+ keys_[L'\uE03C'] = ui::VKEY_F12;
// Common aliases.
- keys_[L'\t'] = app::VKEY_TAB;
- keys_[L'\n'] = app::VKEY_RETURN;
- keys_[L'\r'] = app::VKEY_RETURN;
- keys_[L'\b'] = app::VKEY_BACK;
+ keys_[L'\t'] = ui::VKEY_TAB;
+ keys_[L'\n'] = ui::VKEY_RETURN;
+ keys_[L'\r'] = ui::VKEY_RETURN;
+ keys_[L'\b'] = ui::VKEY_BACK;
- keys_[L' '] = app::VKEY_SPACE;
+ keys_[L' '] = ui::VKEY_SPACE;
// Alpha keys match their ASCII values.
for (int i = 0; i < 26; ++i) {
keys_[static_cast<wchar_t>(L'a' + i)] = \
- static_cast<app::KeyboardCode>(app::VKEY_A + i);
+ static_cast<ui::KeyboardCode>(ui::VKEY_A + i);
shifted_keys_[static_cast<wchar_t>(L'A' + i)] = \
- static_cast<app::KeyboardCode>(app::VKEY_A + i);
+ static_cast<ui::KeyboardCode>(ui::VKEY_A + i);
}
// Numeric keys match their ASCII values.
for (int i = 0; i < 10; ++i) {
keys_[static_cast<wchar_t>(L'0' + i)] = \
- static_cast<app::KeyboardCode>(app::VKEY_0 + i);
+ static_cast<ui::KeyboardCode>(ui::VKEY_0 + i);
}
// The following all assumes the standard US keyboard.
// TODO(jmikhail): Lookup correct keycode based on the current system keyboard
// layout. Right now it's fixed assuming standard ANSI.
- keys_[L'='] = shifted_keys_[L'+'] = app::VKEY_OEM_PLUS;
- keys_[L'-'] = shifted_keys_[L'_'] = app::VKEY_OEM_MINUS;
- keys_[L';'] = shifted_keys_[L':'] = app::VKEY_OEM_1;
- keys_[L'/'] = shifted_keys_[L'?'] = app::VKEY_OEM_2;
- keys_[L'`'] = shifted_keys_[L'~'] = app::VKEY_OEM_3;
- keys_[L'['] = shifted_keys_[L'{'] = app::VKEY_OEM_4;
- keys_[L'\\'] = shifted_keys_[L'|'] = app::VKEY_OEM_5;
- keys_[L']'] = shifted_keys_[L'}'] = app::VKEY_OEM_6;
- keys_[L'\''] = shifted_keys_[L'"'] = app::VKEY_OEM_7;
- keys_[L','] = shifted_keys_[L'<'] = app::VKEY_OEM_COMMA;
- keys_[L'.'] = shifted_keys_[L'>'] = app::VKEY_OEM_PERIOD;
- shifted_keys_[L'!'] = app::VKEY_1;
- shifted_keys_[L'@'] = app::VKEY_2;
- shifted_keys_[L'#'] = app::VKEY_3;
- shifted_keys_[L'$'] = app::VKEY_4;
- shifted_keys_[L'%'] = app::VKEY_5;
- shifted_keys_[L'^'] = app::VKEY_6;
- shifted_keys_[L'&'] = app::VKEY_7;
- shifted_keys_[L'*'] = app::VKEY_8;
- shifted_keys_[L'('] = app::VKEY_9;
- shifted_keys_[L')'] = app::VKEY_0;
+ keys_[L'='] = shifted_keys_[L'+'] = ui::VKEY_OEM_PLUS;
+ keys_[L'-'] = shifted_keys_[L'_'] = ui::VKEY_OEM_MINUS;
+ keys_[L';'] = shifted_keys_[L':'] = ui::VKEY_OEM_1;
+ keys_[L'/'] = shifted_keys_[L'?'] = ui::VKEY_OEM_2;
+ keys_[L'`'] = shifted_keys_[L'~'] = ui::VKEY_OEM_3;
+ keys_[L'['] = shifted_keys_[L'{'] = ui::VKEY_OEM_4;
+ keys_[L'\\'] = shifted_keys_[L'|'] = ui::VKEY_OEM_5;
+ keys_[L']'] = shifted_keys_[L'}'] = ui::VKEY_OEM_6;
+ keys_[L'\''] = shifted_keys_[L'"'] = ui::VKEY_OEM_7;
+ keys_[L','] = shifted_keys_[L'<'] = ui::VKEY_OEM_COMMA;
+ keys_[L'.'] = shifted_keys_[L'>'] = ui::VKEY_OEM_PERIOD;
+ shifted_keys_[L'!'] = ui::VKEY_1;
+ shifted_keys_[L'@'] = ui::VKEY_2;
+ shifted_keys_[L'#'] = ui::VKEY_3;
+ shifted_keys_[L'$'] = ui::VKEY_4;
+ shifted_keys_[L'%'] = ui::VKEY_5;
+ shifted_keys_[L'^'] = ui::VKEY_6;
+ shifted_keys_[L'&'] = ui::VKEY_7;
+ shifted_keys_[L'*'] = ui::VKEY_8;
+ shifted_keys_[L'('] = ui::VKEY_9;
+ shifted_keys_[L')'] = ui::VKEY_0;
}
-app::KeyboardCode KeyMap::Get(const wchar_t& key) const {
- std::map<wchar_t, app::KeyboardCode>::const_iterator it;
+ui::KeyboardCode KeyMap::Get(const wchar_t& key) const {
+ std::map<wchar_t, ui::KeyboardCode>::const_iterator it;
it = keys_.find(key);
if (it == keys_.end()) {
it = shifted_keys_.find(key);
if (it == shifted_keys_.end()) {
- return app::VKEY_UNKNOWN;
+ return ui::VKEY_UNKNOWN;
}
}
return it->second;
}
bool KeyMap::Press(const scoped_refptr<WindowProxy>& window,
- const app::KeyboardCode key_code,
+ const ui::KeyboardCode key_code,
const wchar_t& key) {
- if (key_code == app::VKEY_SHIFT) {
+ if (key_code == ui::VKEY_SHIFT) {
shift_ = !shift_;
- } else if (key_code == app::VKEY_CONTROL) {
+ } else if (key_code == ui::VKEY_CONTROL) {
control_ = !control_;
- } else if (key_code == app::VKEY_MENU) { // ALT
+ } else if (key_code == ui::VKEY_MENU) { // ALT
alt_ = !alt_;
- } else if (key_code == app::VKEY_COMMAND) {
+ } else if (key_code == ui::VKEY_COMMAND) {
command_ = !command_;
}
diff --git a/chrome/test/webdriver/keymap.h b/chrome/test/webdriver/keymap.h
index b0abf46..fab2bcc 100644
--- a/chrome/test/webdriver/keymap.h
+++ b/chrome/test/webdriver/keymap.h
@@ -7,8 +7,8 @@
#include <map>
-#include "app/keyboard_codes.h"
#include "chrome/test/automation/window_proxy.h"
+#include "ui/base/keycodes/keyboard_codes.h"
namespace webdriver {
@@ -16,10 +16,10 @@ namespace webdriver {
class KeyMap {
public:
KeyMap();
- app::KeyboardCode Get(const wchar_t& key) const;
+ ui::KeyboardCode Get(const wchar_t& key) const;
bool Press(const scoped_refptr<WindowProxy>& window,
- const app::KeyboardCode key_code,
+ const ui::KeyboardCode key_code,
const wchar_t& key);
// Sets the Shift, Alt, Cntl, and Cmd keys to not pressed.
@@ -30,8 +30,8 @@ class KeyMap {
bool alt_;
bool control_;
bool command_;
- std::map<wchar_t, app::KeyboardCode> keys_;
- std::map<wchar_t, app::KeyboardCode> shifted_keys_;
+ std::map<wchar_t, ui::KeyboardCode> keys_;
+ std::map<wchar_t, ui::KeyboardCode> shifted_keys_;
DISALLOW_COPY_AND_ASSIGN(KeyMap);
};