| OLD | NEW | 
|    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #include "views/controls/link.h" |    5 #include "views/controls/link.h" | 
|    6  |    6  | 
|    7 #include "build/build_config.h" |    7 #include "build/build_config.h" | 
|    8  |    8  | 
|    9 #if defined(OS_LINUX) |    9 #if defined(OS_LINUX) | 
|   10 #include <gdk/gdk.h> |   10 #include <gdk/gdk.h> | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   96 std::string Link::GetClassName() const { |   96 std::string Link::GetClassName() const { | 
|   97   return kViewClassName; |   97   return kViewClassName; | 
|   98 } |   98 } | 
|   99  |   99  | 
|  100 gfx::NativeCursor Link::GetCursor(const MouseEvent& event) { |  100 gfx::NativeCursor Link::GetCursor(const MouseEvent& event) { | 
|  101   if (!IsEnabled()) |  101   if (!IsEnabled()) | 
|  102     return NULL; |  102     return NULL; | 
|  103 #if defined(OS_WIN) |  103 #if defined(OS_WIN) | 
|  104   static HCURSOR g_hand_cursor = LoadCursor(NULL, IDC_HAND); |  104   static HCURSOR g_hand_cursor = LoadCursor(NULL, IDC_HAND); | 
|  105   return g_hand_cursor; |  105   return g_hand_cursor; | 
 |  106 #elif defined(USE_AURA) | 
 |  107   // TODO(saintlou): | 
 |  108   return NULL; | 
|  106 #elif defined(OS_LINUX) |  109 #elif defined(OS_LINUX) | 
|  107   return gfx::GetCursor(GDK_HAND2); |  110   return gfx::GetCursor(GDK_HAND2); | 
|  108 #endif |  111 #endif | 
|  109 } |  112 } | 
|  110  |  113  | 
|  111 bool Link::HitTest(const gfx::Point& l) const { |  114 bool Link::HitTest(const gfx::Point& l) const { | 
|  112   // We need to allow clicks on the link. So we override the implementation in |  115   // We need to allow clicks on the link. So we override the implementation in | 
|  113   // Label and use the default implementation of View. |  116   // Label and use the default implementation of View. | 
|  114   return View::HitTest(l); |  117   return View::HitTest(l); | 
|  115 } |  118 } | 
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  219   } else { |  222   } else { | 
|  220     if (font().GetStyle() & gfx::Font::UNDERLINED) { |  223     if (font().GetStyle() & gfx::Font::UNDERLINED) { | 
|  221       Label::SetFont( |  224       Label::SetFont( | 
|  222           font().DeriveFont(0, font().GetStyle() & ~gfx::Font::UNDERLINED)); |  225           font().DeriveFont(0, font().GetStyle() & ~gfx::Font::UNDERLINED)); | 
|  223     } |  226     } | 
|  224     Label::SetColor(disabled_color_); |  227     Label::SetColor(disabled_color_); | 
|  225   } |  228   } | 
|  226 } |  229 } | 
|  227  |  230  | 
|  228 }  // namespace views |  231 }  // namespace views | 
| OLD | NEW |