// 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 "base/strings/string_util.h" #include "ui/base/text/text_elider.h" #include "ui/views/controls/label.h" #include "ui/views/controls/link.h" #include "ui/views/controls/styled_label_listener.h" namespace views { namespace { // Calculates the height of a line of text. Currently returns the height of // a label. int CalculateLineHeight() { Label label; return label.GetPreferredSize().height(); } scoped_ptr CreateLabelRange(const string16& text, const StyledLabel::RangeStyleInfo& style_info, views::LinkListener* link_listener) { scoped_ptr