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

Side by Side Diff: ui/views/controls/tree/tree_view_win.cc

Issue 10828265: Replace views::LocatedEvent with ui::LocatedEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/events/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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/tree/tree_view_win.h" 5 #include "ui/views/controls/tree/tree_view_win.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 return; 489 return;
490 } 490 }
491 491
492 if (show_context_menu_only_when_node_selected_) { 492 if (show_context_menu_only_when_node_selected_) {
493 if (!GetSelectedNode()) 493 if (!GetSelectedNode())
494 return; 494 return;
495 495
496 // Make sure the mouse is over the selected node. 496 // Make sure the mouse is over the selected node.
497 TVHITTESTINFO hit_info; 497 TVHITTESTINFO hit_info;
498 gfx::Point local_loc(location); 498 gfx::Point local_loc(location);
499 ConvertPointToView(NULL, this, &local_loc); 499 ConvertPointToTarget(NULL, this, &local_loc);
500 hit_info.pt = local_loc.ToPOINT(); 500 hit_info.pt = local_loc.ToPOINT();
501 HTREEITEM hit_item = TreeView_HitTest(tree_view_, &hit_info); 501 HTREEITEM hit_item = TreeView_HitTest(tree_view_, &hit_info);
502 if (!hit_item || 502 if (!hit_item ||
503 GetNodeDetails(GetSelectedNode())->tree_item != hit_item || 503 GetNodeDetails(GetSelectedNode())->tree_item != hit_item ||
504 (hit_info.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT | 504 (hit_info.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT |
505 TVHT_ONITEMINDENT)) == 0) { 505 TVHT_ONITEMINDENT)) == 0) {
506 return; 506 return;
507 } 507 }
508 } 508 }
509 ShowContextMenu(gfx::Point(location), true); 509 ShowContextMenu(gfx::Point(location), true);
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 } 795 }
796 // Fall through and let the default handler process as well. 796 // Fall through and let the default handler process as well.
797 break; 797 break;
798 } 798 }
799 WNDPROC handler = tree->original_handler_; 799 WNDPROC handler = tree->original_handler_;
800 DCHECK(handler); 800 DCHECK(handler);
801 return CallWindowProc(handler, window, message, w_param, l_param); 801 return CallWindowProc(handler, window, message, w_param, l_param);
802 } 802 }
803 803
804 } // namespace views 804 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/tree/tree_view_views.cc ('k') | ui/views/events/event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698