diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 17:36:09 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-13 17:36:09 +0000 |
commit | b6d81261a469240e25b41e7125bb7166ca3d35bb (patch) | |
tree | 9ddaf52100915560ce5c3d0167e79ef4a26aec56 /webkit | |
parent | 917a44b0724089630cb1d962a9383df7a1deaf7e (diff) | |
download | chromium_src-b6d81261a469240e25b41e7125bb7166ca3d35bb.zip chromium_src-b6d81261a469240e25b41e7125bb7166ca3d35bb.tar.gz chromium_src-b6d81261a469240e25b41e7125bb7166ca3d35bb.tar.bz2 |
Move app/key* to ui/base/keycodes/*
BUG=none
TEST=none
TBR=brettw
Review URL: http://codereview.chromium.org/6246001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71330 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/support/DEPS | 3 | ||||
-rw-r--r-- | webkit/support/webkit_support.h | 28 | ||||
-rw-r--r-- | webkit/tools/test_shell/event_sending_controller.cc | 42 |
3 files changed, 37 insertions, 36 deletions
diff --git a/webkit/support/DEPS b/webkit/support/DEPS index b42ea7d..7cbc981 100644 --- a/webkit/support/DEPS +++ b/webkit/support/DEPS @@ -1,4 +1,5 @@ include_rules = [ "+app", - "+media" + "+media", + "+ui", ] diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h index 321a0bb..9150e0a 100644 --- a/webkit/support/webkit_support.h +++ b/webkit/support/webkit_support.h @@ -8,11 +8,11 @@ #include <string> #include <vector> -#include "app/keyboard_codes.h" #include "base/basictypes.h" #include "base/string16.h" #include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h" #include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h" +#include "ui/base/keycodes/keyboard_codes.h" class WebURLLoaderMockFactory; namespace WebKit { @@ -161,19 +161,19 @@ void OpenFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSystem::Type type, // -------- Keyboard code enum { - VKEY_LEFT = app::VKEY_LEFT, - VKEY_RIGHT = app::VKEY_RIGHT, - VKEY_UP = app::VKEY_UP, - VKEY_DOWN = app::VKEY_DOWN, - VKEY_RETURN = app::VKEY_RETURN, - VKEY_INSERT = app::VKEY_INSERT, - VKEY_DELETE = app::VKEY_DELETE, - VKEY_PRIOR = app::VKEY_PRIOR, - VKEY_NEXT = app::VKEY_NEXT, - VKEY_HOME = app::VKEY_HOME, - VKEY_END = app::VKEY_END, - VKEY_SNAPSHOT = app::VKEY_SNAPSHOT, - VKEY_F1 = app::VKEY_F1, + VKEY_LEFT = ui::VKEY_LEFT, + VKEY_RIGHT = ui::VKEY_RIGHT, + VKEY_UP = ui::VKEY_UP, + VKEY_DOWN = ui::VKEY_DOWN, + VKEY_RETURN = ui::VKEY_RETURN, + VKEY_INSERT = ui::VKEY_INSERT, + VKEY_DELETE = ui::VKEY_DELETE, + VKEY_PRIOR = ui::VKEY_PRIOR, + VKEY_NEXT = ui::VKEY_NEXT, + VKEY_HOME = ui::VKEY_HOME, + VKEY_END = ui::VKEY_END, + VKEY_SNAPSHOT = ui::VKEY_SNAPSHOT, + VKEY_F1 = ui::VKEY_F1, }; } // namespace webkit_support diff --git a/webkit/tools/test_shell/event_sending_controller.cc b/webkit/tools/test_shell/event_sending_controller.cc index d86d374..ba7c484 100644 --- a/webkit/tools/test_shell/event_sending_controller.cc +++ b/webkit/tools/test_shell/event_sending_controller.cc @@ -19,7 +19,6 @@ #include <queue> #include <vector> -#include "app/keyboard_codes.h" #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" @@ -36,6 +35,7 @@ #include "third_party/WebKit/WebKit/chromium/public/WebTouchPoint.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/WebKit/chromium/public/WebBindings.h" +#include "ui/base/keycodes/keyboard_codes.h" #include "webkit/glue/webkit_glue.h" #include "webkit/tools/test_shell/test_shell.h" #include "webkit/tools/test_shell/test_webview_delegate.h" @@ -215,16 +215,16 @@ bool GetEditCommand(const WebKeyboardEvent& event, std::string* name) { return false; switch (event.windowsKeyCode) { - case app::VKEY_LEFT: + case ui::VKEY_LEFT: *name = "MoveToBeginningOfLine"; break; - case app::VKEY_RIGHT: + case ui::VKEY_RIGHT: *name = "MoveToEndOfLine"; break; - case app::VKEY_UP: + case ui::VKEY_UP: *name = "MoveToBeginningOfDocument"; break; - case app::VKEY_DOWN: + case ui::VKEY_DOWN: *name = "MoveToEndOfDocument"; break; default: @@ -535,29 +535,29 @@ void EventSendingController::keyDown( bool needs_shift_key_modifier = false; if (L"\n" == code_str) { generate_char = true; - text = code = app::VKEY_RETURN; + text = code = ui::VKEY_RETURN; } else if (L"rightArrow" == code_str) { - code = app::VKEY_RIGHT; + code = ui::VKEY_RIGHT; } else if (L"downArrow" == code_str) { - code = app::VKEY_DOWN; + code = ui::VKEY_DOWN; } else if (L"leftArrow" == code_str) { - code = app::VKEY_LEFT; + code = ui::VKEY_LEFT; } else if (L"upArrow" == code_str) { - code = app::VKEY_UP; + code = ui::VKEY_UP; } else if (L"insert" == code_str) { - code = app::VKEY_INSERT; + code = ui::VKEY_INSERT; } else if (L"delete" == code_str) { - code = app::VKEY_DELETE; + code = ui::VKEY_DELETE; } else if (L"pageUp" == code_str) { - code = app::VKEY_PRIOR; + code = ui::VKEY_PRIOR; } else if (L"pageDown" == code_str) { - code = app::VKEY_NEXT; + code = ui::VKEY_NEXT; } else if (L"home" == code_str) { - code = app::VKEY_HOME; + code = ui::VKEY_HOME; } else if (L"end" == code_str) { - code = app::VKEY_END; + code = ui::VKEY_END; } else if (L"printScreen" == code_str) { - code = app::VKEY_SNAPSHOT; + code = ui::VKEY_SNAPSHOT; } else { // Compare the input string with the function-key names defined by the // DOM spec (i.e. "F1",...,"F24"). If the input string is a function-key @@ -567,7 +567,7 @@ void EventSendingController::keyDown( function_key_name += L"F"; function_key_name += UTF8ToWide(base::IntToString(i)); if (function_key_name == code_str) { - code = app::VKEY_F1 + (i - 1); + code = ui::VKEY_F1 + (i - 1); break; } } @@ -783,12 +783,12 @@ MakeMenuItemStringsFor(const WebKit::WebContextMenuData* context_menu, // These constants are based on Safari's context menu because tests // are made for it. static const char* kNonEditableMenuStrings[] = { - "Back", "Reload Page", "Open in Dashbaord", "<separator>", - "View Source", "Save Page As", "Print Page", "Inspect Element", + "Back", "Reload Page", "Open in Dashbaord", "<separator>", + "View Source", "Save Page As", "Print Page", "Inspect Element", 0 }; static const char* kEditableMenuStrings[] = { "Cut", "Copy", "<separator>", "Paste", "Spelling and Grammar", - "Substitutions, Transformations", "Font", "Speech", + "Substitutions, Transformations", "Font", "Speech", "Paragraph Direction", "<separator>", 0 }; // This is possible because mouse events are cancelleable. |