summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:17:44 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 21:17:44 +0000
commit938d54ac33044905429ca7f0f55eb7fe2d459321 (patch)
treeef28224eb9b066b102862c314738873fc081920b /views
parent9343914ea1812ea24afd00724f6a38bf60b2f67c (diff)
downloadchromium_src-938d54ac33044905429ca7f0f55eb7fe2d459321.zip
chromium_src-938d54ac33044905429ca7f0f55eb7fe2d459321.tar.gz
chromium_src-938d54ac33044905429ca7f0f55eb7fe2d459321.tar.bz2
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
Diffstat (limited to 'views')
-rw-r--r--views/controls/tree/tree_view.cc10
-rw-r--r--views/widget/aero_tooltip_manager.cc14
2 files changed, 10 insertions, 14 deletions
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 <atlbase.h>
-#include <atlapp.h>
-#include <atlmisc.h>
+#include <vector>
#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)
diff --git a/views/widget/aero_tooltip_manager.cc b/views/widget/aero_tooltip_manager.cc
index aef9e65..1d6693e 100644
--- a/views/widget/aero_tooltip_manager.cc
+++ b/views/widget/aero_tooltip_manager.cc
@@ -5,12 +5,11 @@
#include "views/widget/aero_tooltip_manager.h"
#include <windows.h>
-#include <atlbase.h>
-#include <atlapp.h> // for GET_X/Y_LPARAM
#include <commctrl.h>
#include <shlobj.h>
#include "app/l10n_util_win.h"
+#include "base/gfx/point.h"
#include "base/message_loop.h"
namespace views {
@@ -33,13 +32,12 @@ void AeroTooltipManager::OnMouse(UINT u_msg, WPARAM w_param, LPARAM l_param) {
initial_timer_->Disown();
if (u_msg == WM_MOUSEMOVE || u_msg == WM_NCMOUSEMOVE) {
- int x = GET_X_LPARAM(l_param);
- int y = GET_Y_LPARAM(l_param);
- if (last_mouse_x_ != x || last_mouse_y_ != y) {
- last_mouse_x_ = x;
- last_mouse_y_ = y;
+ gfx::Point mouse_pos(l_param);
+ if (last_mouse_x_ != mouse_pos.x() || last_mouse_y_ != mouse_pos.y()) {
+ last_mouse_x_ = mouse_pos.x();
+ last_mouse_y_ = mouse_pos.y();
HideKeyboardTooltip();
- UpdateTooltip(x, y);
+ UpdateTooltip(mouse_pos.x(), mouse_pos.y());
}
// Delay opening of the tooltip just in case the user moves their