| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/views/controls/link.h" | 5 #include "ui/views/controls/link.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 SetDisabledColor( | 167 SetDisabledColor( |
| 168 theme->GetSystemColor(ui::NativeTheme::kColorId_LinkDisabled)); | 168 theme->GetSystemColor(ui::NativeTheme::kColorId_LinkDisabled)); |
| 169 } | 169 } |
| 170 | 170 |
| 171 void Link::SetEnabledColor(SkColor color) { | 171 void Link::SetEnabledColor(SkColor color) { |
| 172 requested_enabled_color_set_ = true; | 172 requested_enabled_color_set_ = true; |
| 173 requested_enabled_color_ = color; | 173 requested_enabled_color_ = color; |
| 174 Label::SetEnabledColor(GetEnabledColor()); | 174 Label::SetEnabledColor(GetEnabledColor()); |
| 175 } | 175 } |
| 176 | 176 |
| 177 bool Link::IsSelectionSupported() const { |
| 178 return false; |
| 179 } |
| 180 |
| 177 void Link::SetUnderline(bool underline) { | 181 void Link::SetUnderline(bool underline) { |
| 178 if (underline_ == underline) | 182 if (underline_ == underline) |
| 179 return; | 183 return; |
| 180 underline_ = underline; | 184 underline_ = underline; |
| 181 RecalculateFont(); | 185 RecalculateFont(); |
| 182 } | 186 } |
| 183 | 187 |
| 184 void Link::Init() { | 188 void Link::Init() { |
| 185 listener_ = NULL; | 189 listener_ = NULL; |
| 186 pressed_ = false; | 190 pressed_ = false; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 if (GetNativeTheme()) { | 243 if (GetNativeTheme()) { |
| 240 return GetNativeTheme()->GetSystemColor( | 244 return GetNativeTheme()->GetSystemColor( |
| 241 pressed_ ? ui::NativeTheme::kColorId_LinkPressed | 245 pressed_ ? ui::NativeTheme::kColorId_LinkPressed |
| 242 : ui::NativeTheme::kColorId_LinkEnabled); | 246 : ui::NativeTheme::kColorId_LinkEnabled); |
| 243 } | 247 } |
| 244 | 248 |
| 245 return gfx::kPlaceholderColor; | 249 return gfx::kPlaceholderColor; |
| 246 } | 250 } |
| 247 | 251 |
| 248 } // namespace views | 252 } // namespace views |
| OLD | NEW |