// Copyright 2013 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "ui/views/controls/styled_label.h" #include #include #include "base/strings/string_util.h" #include "ui/gfx/font_list.h" #include "ui/gfx/text_elider.h" #include "ui/native_theme/native_theme.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" #include "ui/views/controls/styled_label_listener.h" namespace views { // Helpers -------------------------------------------------------------------- namespace { // Calculates the height of a line of text. Currently returns the height of // a label. int CalculateLineHeight(const gfx::FontList& font_list) { Label label; label.SetFontList(font_list); return label.GetPreferredSize().height(); } scoped_ptr