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

Side by Side Diff: chrome/views/controls/tree/tree_view.cc

Issue 99161: Handle all accelerators in focus manager when focused view doesn't want to ta... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/location_bar_view.cc ('k') | chrome/views/focus/focus_manager.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/views/controls/tree/tree_view.h" 5 #include "chrome/views/controls/tree/tree_view.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 8
9 #include "base/win_util.h" 9 #include "base/win_util.h"
10 #include "chrome/common/gfx/chrome_canvas.h" 10 #include "chrome/common/gfx/chrome_canvas.h"
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 return true; 468 return true;
469 } else if (virtual_key_code == VK_RETURN && !process_enter_) { 469 } else if (virtual_key_code == VK_RETURN && !process_enter_) {
470 Widget* widget = GetWidget(); 470 Widget* widget = GetWidget();
471 DCHECK(widget); 471 DCHECK(widget);
472 FocusManager* fm = FocusManager::GetFocusManager(widget->GetNativeView()); 472 FocusManager* fm = FocusManager::GetFocusManager(widget->GetNativeView());
473 DCHECK(fm); 473 DCHECK(fm);
474 Accelerator accelerator(Accelerator(static_cast<int>(virtual_key_code), 474 Accelerator accelerator(Accelerator(static_cast<int>(virtual_key_code),
475 win_util::IsShiftPressed(), 475 win_util::IsShiftPressed(),
476 win_util::IsCtrlPressed(), 476 win_util::IsCtrlPressed(),
477 win_util::IsAltPressed())); 477 win_util::IsAltPressed()));
478 fm->ProcessAccelerator(accelerator, true); 478 fm->ProcessAccelerator(accelerator);
479 return true; 479 return true;
480 } 480 }
481 return false; 481 return false;
482 } 482 }
483 483
484 void TreeView::OnContextMenu(const CPoint& location) { 484 void TreeView::OnContextMenu(const CPoint& location) {
485 if (!GetContextMenuController()) 485 if (!GetContextMenuController())
486 return; 486 return;
487 487
488 if (location.x == -1 && location.y == -1) { 488 if (location.x == -1 && location.y == -1) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 } 736 }
737 // Fall through and let the default handler process as well. 737 // Fall through and let the default handler process as well.
738 break; 738 break;
739 } 739 }
740 WNDPROC handler = tree->original_handler_; 740 WNDPROC handler = tree->original_handler_;
741 DCHECK(handler); 741 DCHECK(handler);
742 return CallWindowProc(handler, window, message, w_param, l_param); 742 return CallWindowProc(handler, window, message, w_param, l_param);
743 } 743 }
744 744
745 } // namespace views 745 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/views/location_bar_view.cc ('k') | chrome/views/focus/focus_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698