OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |