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

Side by Side Diff: views/view_text_utils.cc

Issue 6312156: Change includes of gfx/* to ui/gfx/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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 | « views/view_text_utils.h ('k') | views/view_unittest.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "views/view_text_utils.h" 5 #include "views/view_text_utils.h"
6 6
7 #include "base/i18n/bidi_line_iterator.h" 7 #include "base/i18n/bidi_line_iterator.h"
8 #include "base/i18n/break_iterator.h" 8 #include "base/i18n/break_iterator.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "gfx/canvas_skia.h" 11 #include "ui/gfx/canvas_skia.h"
12 #include "gfx/color_utils.h" 12 #include "ui/gfx/color_utils.h"
13 #include "gfx/size.h" 13 #include "ui/gfx/size.h"
14 #include "views/controls/label.h" 14 #include "views/controls/label.h"
15 #include "views/controls/link.h" 15 #include "views/controls/link.h"
16 16
17 namespace view_text_utils { 17 namespace view_text_utils {
18 18
19 void DrawTextAndPositionUrl(gfx::Canvas* canvas, 19 void DrawTextAndPositionUrl(gfx::Canvas* canvas,
20 views::Label* label, 20 views::Label* label,
21 const std::wstring& text, 21 const std::wstring& text,
22 views::Link* link, 22 views::Link* link,
23 gfx::Rect* rect, 23 gfx::Rect* rect,
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 int font_height, 161 int font_height,
162 gfx::Size* position, 162 gfx::Size* position,
163 const gfx::Rect& bounds) { 163 const gfx::Rect& bounds) {
164 if (position->width() + word_width > bounds.right()) { 164 if (position->width() + word_width > bounds.right()) {
165 position->set_width(0); 165 position->set_width(0);
166 position->Enlarge(0, font_height); 166 position->Enlarge(0, font_height);
167 } 167 }
168 } 168 }
169 169
170 } // namespace view_text_utils 170 } // namespace view_text_utils
OLDNEW
« no previous file with comments | « views/view_text_utils.h ('k') | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698