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

Side by Side Diff: views/controls/tree/tree_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, 3 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 unified diff | Download patch
« no previous file with comments | « views/controls/tree/tree_view.h ('k') | views/event.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "views/controls/tree/tree_view.h" 5 #include "views/controls/tree/tree_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/keyboard_codes.h"
9 #include "app/l10n_util_win.h" 10 #include "app/l10n_util_win.h"
10 #include "app/resource_bundle.h" 11 #include "app/resource_bundle.h"
11 #include "base/i18n/rtl.h" 12 #include "base/i18n/rtl.h"
12 #include "base/keyboard_codes.h"
13 #include "base/stl_util-inl.h" 13 #include "base/stl_util-inl.h"
14 #include "base/win_util.h" 14 #include "base/win_util.h"
15 #include "gfx/canvas_skia.h" 15 #include "gfx/canvas_skia.h"
16 #include "gfx/canvas_skia_paint.h" 16 #include "gfx/canvas_skia_paint.h"
17 #include "gfx/favicon_size.h" 17 #include "gfx/favicon_size.h"
18 #include "gfx/icon_util.h" 18 #include "gfx/icon_util.h"
19 #include "gfx/point.h" 19 #include "gfx/point.h"
20 #include "grit/app_resources.h" 20 #include "grit/app_resources.h"
21 #include "views/focus/focus_manager.h" 21 #include "views/focus/focus_manager.h"
22 #include "views/widget/widget.h" 22 #include "views/widget/widget.h"
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 win_util::WinToKeyboardCode(key_down_message->wVKey)); 450 win_util::WinToKeyboardCode(key_down_message->wVKey));
451 } 451 }
452 break; 452 break;
453 453
454 default: 454 default:
455 break; 455 break;
456 } 456 }
457 return 0; 457 return 0;
458 } 458 }
459 459
460 bool TreeView::OnKeyDown(base::KeyboardCode virtual_key_code) { 460 bool TreeView::OnKeyDown(app::KeyboardCode virtual_key_code) {
461 if (virtual_key_code == VK_F2) { 461 if (virtual_key_code == VK_F2) {
462 if (!GetEditingNode()) { 462 if (!GetEditingNode()) {
463 TreeModelNode* selected_node = GetSelectedNode(); 463 TreeModelNode* selected_node = GetSelectedNode();
464 if (selected_node) 464 if (selected_node)
465 StartEditing(selected_node); 465 StartEditing(selected_node);
466 } 466 }
467 return true; 467 return true;
468 } else if (virtual_key_code == base::VKEY_RETURN && !process_enter_) { 468 } else if (virtual_key_code == app::VKEY_RETURN && !process_enter_) {
469 Widget* widget = GetWidget(); 469 Widget* widget = GetWidget();
470 DCHECK(widget); 470 DCHECK(widget);
471 Accelerator accelerator(Accelerator(virtual_key_code, 471 Accelerator accelerator(Accelerator(virtual_key_code,
472 win_util::IsShiftPressed(), 472 win_util::IsShiftPressed(),
473 win_util::IsCtrlPressed(), 473 win_util::IsCtrlPressed(),
474 win_util::IsAltPressed())); 474 win_util::IsAltPressed()));
475 GetFocusManager()->ProcessAccelerator(accelerator); 475 GetFocusManager()->ProcessAccelerator(accelerator);
476 return true; 476 return true;
477 } 477 }
478 return false; 478 return false;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 } 753 }
754 // Fall through and let the default handler process as well. 754 // Fall through and let the default handler process as well.
755 break; 755 break;
756 } 756 }
757 WNDPROC handler = tree->original_handler_; 757 WNDPROC handler = tree->original_handler_;
758 DCHECK(handler); 758 DCHECK(handler);
759 return CallWindowProc(handler, window, message, w_param, l_param); 759 return CallWindowProc(handler, window, message, w_param, l_param);
760 } 760 }
761 761
762 } // namespace views 762 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/tree/tree_view.h ('k') | views/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698