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

Side by Side Diff: ui/views/controls/link.cc

Issue 191723003: Nukes USE_AURA ifdefs from views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: incorporate feedback Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | ui/views/controls/menu/menu_config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "ui/accessibility/ax_view_state.h" 11 #include "ui/accessibility/ax_view_state.h"
12 #include "ui/base/cursor/cursor.h"
12 #include "ui/events/event.h" 13 #include "ui/events/event.h"
13 #include "ui/events/keycodes/keyboard_codes.h" 14 #include "ui/events/keycodes/keyboard_codes.h"
14 #include "ui/gfx/canvas.h" 15 #include "ui/gfx/canvas.h"
15 #include "ui/gfx/color_utils.h" 16 #include "ui/gfx/color_utils.h"
16 #include "ui/gfx/font_list.h" 17 #include "ui/gfx/font_list.h"
17 #include "ui/views/controls/link_listener.h" 18 #include "ui/views/controls/link_listener.h"
18 19
19 #if defined(USE_AURA)
20 #include "ui/base/cursor/cursor.h"
21 #endif
22
23 namespace views { 20 namespace views {
24 21
25 const char Link::kViewClassName[] = "Link"; 22 const char Link::kViewClassName[] = "Link";
26 23
27 Link::Link() : Label(base::string16()) { 24 Link::Link() : Label(base::string16()) {
28 Init(); 25 Init();
29 } 26 }
30 27
31 Link::Link(const base::string16& title) : Label(title) { 28 Link::Link(const base::string16& title) : Label(title) {
32 Init(); 29 Init();
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 void Link::RecalculateFont() { 224 void Link::RecalculateFont() {
228 // Underline the link iff it is enabled and |underline_| is true. 225 // Underline the link iff it is enabled and |underline_| is true.
229 const int style = font_list().GetFontStyle(); 226 const int style = font_list().GetFontStyle();
230 const int intended_style = (enabled() && underline_) ? 227 const int intended_style = (enabled() && underline_) ?
231 (style | gfx::Font::UNDERLINE) : (style & ~gfx::Font::UNDERLINE); 228 (style | gfx::Font::UNDERLINE) : (style & ~gfx::Font::UNDERLINE);
232 if (style != intended_style) 229 if (style != intended_style)
233 Label::SetFontList(font_list().DeriveWithStyle(intended_style)); 230 Label::SetFontList(font_list().DeriveWithStyle(intended_style));
234 } 231 }
235 232
236 } // namespace views 233 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/menu_button.cc ('k') | ui/views/controls/menu/menu_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698