From 938d54ac33044905429ca7f0f55eb7fe2d459321 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Wed, 9 Sep 2009 21:17:44 +0000 Subject: Use gfx::Point instead of GET_X/Y_LPARAM to reduce a dependency on ATL. BUG=5027 TEST=none Review URL: http://codereview.chromium.org/195035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25788 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/tree/tree_view.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'views/controls/tree') diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc index 731b955..196e773 100644 --- a/views/controls/tree/tree_view.cc +++ b/views/controls/tree/tree_view.cc @@ -4,15 +4,14 @@ #include "views/controls/tree/tree_view.h" -#include -#include -#include +#include #include "app/gfx/canvas_paint.h" #include "app/gfx/icon_util.h" #include "app/l10n_util.h" #include "app/l10n_util_win.h" #include "app/resource_bundle.h" +#include "base/gfx/point.h" #include "base/stl_util-inl.h" #include "base/win_util.h" #include "grit/app_resources.h" @@ -53,7 +52,7 @@ TreeView::~TreeView() { void TreeView::SetModel(TreeModel* model) { if (model == model_) return; - if(model_ && tree_view_) + if (model_ && tree_view_) DeleteRootItems(); if (model_) model_->SetObserver(NULL); @@ -727,8 +726,7 @@ LRESULT CALLBACK TreeView::TreeWndProc(HWND window, case WM_RBUTTONDOWN: if (tree->select_on_right_mouse_down_) { TVHITTESTINFO hit_info; - hit_info.pt.x = GET_X_LPARAM(l_param); - hit_info.pt.y = GET_Y_LPARAM(l_param); + hit_info.pt = gfx::Point(l_param).ToPOINT(); HTREEITEM hit_item = TreeView_HitTest(window, &hit_info); if (hit_item && (hit_info.flags & (TVHT_ONITEM | TVHT_ONITEMRIGHT | TVHT_ONITEMINDENT)) != 0) -- cgit v1.1