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

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

Issue 16757004: Use a direct include of strings headers in ui/, part 3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/styled_label.h ('k') | ui/views/controls/tabbed_pane/tabbed_pane.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/styled_label.h" 5 #include "ui/views/controls/styled_label.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "ui/base/text/text_elider.h" 10 #include "ui/base/text/text_elider.h"
11 #include "ui/views/controls/label.h" 11 #include "ui/views/controls/label.h"
12 #include "ui/views/controls/link.h" 12 #include "ui/views/controls/link.h"
13 #include "ui/views/controls/styled_label_listener.h" 13 #include "ui/views/controls/styled_label_listener.h"
14 14
15 namespace views { 15 namespace views {
16 16
17 namespace { 17 namespace {
18 18
19 // Calculates the height of a line of text. Currently returns the height of 19 // Calculates the height of a line of text. Currently returns the height of
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 } 239 }
240 x += view_size.width() - 2 * overlap; 240 x += view_size.width() - 2 * overlap;
241 241
242 remaining_string = remaining_string.substr(chunk.size()); 242 remaining_string = remaining_string.substr(chunk.size());
243 } 243 }
244 244
245 return (line + 1) * line_height + GetInsets().height(); 245 return (line + 1) * line_height + GetInsets().height();
246 } 246 }
247 247
248 } // namespace views 248 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/styled_label.h ('k') | ui/views/controls/tabbed_pane/tabbed_pane.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698