Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: chrome/browser/views/frame/browser_view.cc

Issue 3165064: Move the keyboard files from base/ to app/. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: latest merge Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/find_bar_view.cc ('k') | chrome/browser/views/fullscreen_exit_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/frame/browser_view.cc
diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc
index 819fb75c0e41062171078dbc812b3fd6dead0d6d..28d187a027aa3568b47e4802f6c0eea8eb53fed4 100644
--- a/chrome/browser/views/frame/browser_view.cc
+++ b/chrome/browser/views/frame/browser_view.cc
@@ -688,13 +688,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(base::VKEY_X, false, true, false);
+ *accelerator = views::Accelerator(app::VKEY_X, false, true, false);
return true;
case IDC_COPY:
- *accelerator = views::Accelerator(base::VKEY_C, false, true, false);
+ *accelerator = views::Accelerator(app::VKEY_C, false, true, false);
return true;
case IDC_PASTE:
- *accelerator = views::Accelerator(base::VKEY_V, false, true, false);
+ *accelerator = views::Accelerator(app::VKEY_V, false, true, false);
return true;
}
// Else, we retrieve the accelerator information from the accelerator table.
@@ -1293,7 +1293,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 == base::VKEY_F4 &&
+ if (event.windowsKeyCode == app::VKEY_F4 &&
event.modifiers == NativeWebKeyboardEvent::AltKey) {
DefWindowProc(event.os_event.hwnd, event.os_event.message,
event.os_event.wParam, event.os_event.lParam);
@@ -1305,7 +1305,7 @@ bool BrowserView::PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event,
DCHECK(focus_manager);
views::Accelerator accelerator(
- static_cast<base::KeyboardCode>(event.windowsKeyCode),
+ static_cast<app::KeyboardCode>(event.windowsKeyCode),
(event.modifiers & NativeWebKeyboardEvent::ShiftKey) ==
NativeWebKeyboardEvent::ShiftKey,
(event.modifiers & NativeWebKeyboardEvent::ControlKey) ==
@@ -1371,34 +1371,34 @@ void BrowserView::HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {
// manager to do that.
#if !defined(OS_MACOSX)
void BrowserView::Cut() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_X,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_X,
true, false, false, false);
}
void BrowserView::Copy() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_C,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_C,
true, false, false, false);
}
void BrowserView::Paste() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_V,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::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(), base::VKEY_X,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_X,
false, false, false, true);
}
void BrowserView::Copy() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_C,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_C,
false, false, false, true);
}
void BrowserView::Paste() {
- ui_controls::SendKeyPress(GetNativeHandle(), base::VKEY_V,
+ ui_controls::SendKeyPress(GetNativeHandle(), app::VKEY_V,
false, false, false, true);
}
#endif
@@ -2304,7 +2304,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<base::KeyboardCode>(accelerators[i].key),
+ static_cast<app::KeyboardCode>(accelerators[i].key),
shift_down, ctrl_down, alt_down);
accelerator_table_[accelerator] = accelerators[i].cmd;
« no previous file with comments | « chrome/browser/views/find_bar_view.cc ('k') | chrome/browser/views/fullscreen_exit_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698