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

Side by Side Diff: ui/gfx/canvas_skia.cc

Issue 10808072: ui: No need to typedef testing::Test in unittests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typos Created 8 years, 4 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/compositor/scoped_layer_animation_settings.cc ('k') | ui/gfx/font_list_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) 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/gfx/canvas.h" 5 #include "ui/gfx/canvas.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/base/range/range.h" 10 #include "ui/base/range/range.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 #if defined(OS_LINUX) 181 #if defined(OS_LINUX)
182 // TODO(asvitkine): ash/tooltips/tooltip_controller.cc adds \n's to the string 182 // TODO(asvitkine): ash/tooltips/tooltip_controller.cc adds \n's to the string
183 // without passing MULTI_LINE. 183 // without passing MULTI_LINE.
184 if (text.find('\n') != string16::npos) 184 if (text.find('\n') != string16::npos)
185 flags |= gfx::Canvas::MULTI_LINE; 185 flags |= gfx::Canvas::MULTI_LINE;
186 #endif 186 #endif
187 187
188 return flags; 188 return flags;
189 } 189 }
190 190
191 } // anonymous namespace 191 } // namespace
192 192
193 namespace gfx { 193 namespace gfx {
194 194
195 // static 195 // static
196 void Canvas::SizeStringInt(const string16& text, 196 void Canvas::SizeStringInt(const string16& text,
197 const gfx::Font& font, 197 const gfx::Font& font,
198 int* width, int* height, 198 int* width, int* height,
199 int flags) { 199 int flags) {
200 DCHECK_GE(*width, 0); 200 DCHECK_GE(*width, 0);
201 DCHECK_GE(*height, 0); 201 DCHECK_GE(*height, 0);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 rect.set_height(line_height); 470 rect.set_height(line_height);
471 render_text->SetDisplayRect(rect); 471 render_text->SetDisplayRect(rect);
472 472
473 canvas_->save(SkCanvas::kClip_SaveFlag); 473 canvas_->save(SkCanvas::kClip_SaveFlag);
474 ClipRect(display_rect); 474 ClipRect(display_rect);
475 render_text->Draw(this); 475 render_text->Draw(this);
476 canvas_->restore(); 476 canvas_->restore();
477 } 477 }
478 478
479 } // namespace gfx 479 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/compositor/scoped_layer_animation_settings.cc ('k') | ui/gfx/font_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698