summaryrefslogtreecommitdiffstats
path: root/views/controls/link.cc
diff options
context:
space:
mode:
authormsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-27 03:48:14 +0000
committermsw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-27 03:48:14 +0000
commit5c3039618c8877b29712a5aececb99f8b4a4dd41 (patch)
tree190f9e93f7e06cecd0c9c7164e73624bd681f658 /views/controls/link.cc
parente82f366761fe478f9ba29179be26937a8a376e83 (diff)
downloadchromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.zip
chromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.tar.gz
chromium_src-5c3039618c8877b29712a5aececb99f8b4a4dd41.tar.bz2
Scrap WNDCLASSEX.hCursor, update GetCursorForPoint.
Default to Win arrow in View::GetCursorForPoint & RootView::UpdateCursor. Simplify WidgetWin::SetCursor, avoid sending NULL. Only SetCuror on client events (DWM handles non-client). RIP TextButtonWithHandCursorOver (r57652 through r64531). RIP WindowWin::InitClass & |resize_cursors_|. Add OVERRIDE specifiers liberally. BUG=35356 TEST=Cursor styles shown in Win & Linux toolkit_views. Review URL: http://codereview.chromium.org/6880201 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/link.cc')
-rw-r--r--views/controls/link.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/views/controls/link.cc b/views/controls/link.cc
index fbb1c9b..061b36d 100644
--- a/views/controls/link.cc
+++ b/views/controls/link.cc
@@ -63,10 +63,6 @@ void GetColors(const SkColor* background_color, // NULL means "use default"
namespace views {
-#if defined(OS_WIN)
-static HCURSOR g_hand_cursor = NULL;
-#endif
-
const char Link::kViewClassName[] = "views/Link";
Link::Link() : Label(L""),
@@ -157,9 +153,9 @@ void Link::SetFont(const gfx::Font& font) {
ValidateStyle();
}
-void Link::SetEnabled(bool f) {
- if (f != enabled_) {
- enabled_ = f;
+void Link::SetEnabled(bool flag) {
+ if (flag != enabled_) {
+ enabled_ = flag;
ValidateStyle();
SchedulePaint();
}
@@ -170,8 +166,7 @@ gfx::NativeCursor Link::GetCursorForPoint(ui::EventType event_type,
if (!enabled_)
return NULL;
#if defined(OS_WIN)
- if (!g_hand_cursor)
- g_hand_cursor = LoadCursor(NULL, IDC_HAND);
+ static HCURSOR g_hand_cursor = LoadCursor(NULL, IDC_HAND);
return g_hand_cursor;
#elif defined(OS_LINUX)
return gfx::GetCursor(GDK_HAND2);