diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 20:51:10 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-03 20:51:10 +0000 |
commit | d78f40f3543cd057d845625d1abce9cd79b0682c (patch) | |
tree | 3d5a0aec91ab97eb48afd2de6df7363522715640 /views/controls | |
parent | 1c977ab1081a4891419e40d6e4b1615c6e2583fb (diff) | |
download | chromium_src-d78f40f3543cd057d845625d1abce9cd79b0682c.zip chromium_src-d78f40f3543cd057d845625d1abce9cd79b0682c.tar.gz chromium_src-d78f40f3543cd057d845625d1abce9cd79b0682c.tar.bz2 |
Uses POINT instead of CPoint to reduce the dependency in ATL.
Patch submitted by Thiago Farina:
http://codereview.chromium.org/188017
BUG= http://crbug.com/2185
TEST=None
Review URL: http://codereview.chromium.org/199009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25365 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/native_control.cc | 4 | ||||
-rw-r--r-- | views/controls/native_control.h | 6 | ||||
-rw-r--r-- | views/controls/table/table_view.cc | 4 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_win.cc | 4 | ||||
-rw-r--r-- | views/controls/textfield/native_textfield_win.h | 2 | ||||
-rw-r--r-- | views/controls/tree/tree_view.cc | 2 | ||||
-rw-r--r-- | views/controls/tree/tree_view.h | 2 |
7 files changed, 10 insertions, 14 deletions
diff --git a/views/controls/native_control.cc b/views/controls/native_control.cc index fd247f9..0c89664 100644 --- a/views/controls/native_control.cc +++ b/views/controls/native_control.cc @@ -122,7 +122,7 @@ class NativeControlContainer : public CWindowImpl<NativeControlContainer, parent_->OnDestroy(); } - void OnContextMenu(HWND window, const WTL::CPoint& location) { + void OnContextMenu(HWND window, const POINT& location) { if (parent_) parent_->OnContextMenu(location); } @@ -255,7 +255,7 @@ void NativeControl::Layout() { } } -void NativeControl::OnContextMenu(const CPoint& location) { +void NativeControl::OnContextMenu(const POINT& location) { if (!GetContextMenuController()) return; diff --git a/views/controls/native_control.h b/views/controls/native_control.h index 0f68fe1..972ef36 100644 --- a/views/controls/native_control.h +++ b/views/controls/native_control.h @@ -9,10 +9,6 @@ #include "views/view.h" -namespace WTL { -class CPoint; -} - namespace views { class NativeViewHost; @@ -57,7 +53,7 @@ class NativeControl : public View { virtual LRESULT OnCommand(UINT code, int id, HWND source) { return 0; } // Invoked when the appropriate gesture for a context menu is issued. - virtual void OnContextMenu(const WTL::CPoint& location); + virtual void OnContextMenu(const POINT& location); // Overridden so to set the native focus to the native control. virtual void Focus(); diff --git a/views/controls/table/table_view.cc b/views/controls/table/table_view.cc index f1e63e3..a2d65d3 100644 --- a/views/controls/table/table_view.cc +++ b/views/controls/table/table_view.cc @@ -537,9 +537,9 @@ LRESULT CALLBACK TableView::TableWndProc(HWND window, // the position supplied in the l_param. if (table_view->UILayoutIsRightToLeft() && (GET_X_LPARAM(l_param) != -1 || GET_Y_LPARAM(l_param) != -1)) { - WTL::CPoint screen_point; + POINT screen_point; GetCursorPos(&screen_point); - WTL::CPoint table_point = screen_point; + POINT table_point = screen_point; WTL::CRect client_rect; if (ScreenToClient(window, &table_point) && GetClientRect(window, &client_rect) && diff --git a/views/controls/textfield/native_textfield_win.cc b/views/controls/textfield/native_textfield_win.cc index 1e06816..6bae442 100644 --- a/views/controls/textfield/native_textfield_win.cc +++ b/views/controls/textfield/native_textfield_win.cc @@ -272,8 +272,8 @@ void NativeTextfieldWin::OnChar(TCHAR ch, UINT repeat_count, UINT flags) { HandleKeystroke(GetCurrentMessage()->message, ch, repeat_count, flags); } -void NativeTextfieldWin::OnContextMenu(HWND window, const CPoint& point) { - CPoint p(point); +void NativeTextfieldWin::OnContextMenu(HWND window, const POINT& point) { + POINT p(point); if (point.x == -1 || point.y == -1) { GetCaretPos(&p); MapWindowPoints(HWND_DESKTOP, &p, 1); diff --git a/views/controls/textfield/native_textfield_win.h b/views/controls/textfield/native_textfield_win.h index 99b2a3b..cab5981 100644 --- a/views/controls/textfield/native_textfield_win.h +++ b/views/controls/textfield/native_textfield_win.h @@ -112,7 +112,7 @@ class NativeTextfieldWin // message handlers void OnChar(TCHAR key, UINT repeat_count, UINT flags); - void OnContextMenu(HWND window, const CPoint& point); + void OnContextMenu(HWND window, const POINT& point); void OnCopy(); void OnCut(); LRESULT OnImeChar(UINT message, WPARAM wparam, LPARAM lparam); diff --git a/views/controls/tree/tree_view.cc b/views/controls/tree/tree_view.cc index 5a2fb42..731b955 100644 --- a/views/controls/tree/tree_view.cc +++ b/views/controls/tree/tree_view.cc @@ -481,7 +481,7 @@ bool TreeView::OnKeyDown(int virtual_key_code) { return false; } -void TreeView::OnContextMenu(const WTL::CPoint& location) { +void TreeView::OnContextMenu(const POINT& location) { if (!GetContextMenuController()) return; diff --git a/views/controls/tree/tree_view.h b/views/controls/tree/tree_view.h index e3427d0..72667bf 100644 --- a/views/controls/tree/tree_view.h +++ b/views/controls/tree/tree_view.h @@ -161,7 +161,7 @@ class TreeView : public NativeControl, TreeModelObserver { // start editting. virtual bool OnKeyDown(int virtual_key_code); - virtual void OnContextMenu(const WTL::CPoint& location); + virtual void OnContextMenu(const POINT& location); // Returns the TreeModelNode for |tree_item|. TreeModelNode* GetNodeForTreeItem(HTREEITEM tree_item); |