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

Unified Diff: views/controls/link.cc

Issue 6880201: Scrap WNDCLASSEX.hCursor, update GetCursorForPoint, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use brace style struct init for WNDCLASSEX |class_ex|, fix comment. Created 9 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/link.h ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/link.cc
diff --git a/views/controls/link.cc b/views/controls/link.cc
index fbb1c9bac7720c7780a1f4fcb02e2be4703477af..061b36d5581404643606cce7b889aa58528206df 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);
« no previous file with comments | « views/controls/link.h ('k') | views/controls/resize_area.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698