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

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

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 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
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gfx/render_text_mac.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/render_text_harfbuzz.h" 5 #include "ui/gfx/render_text_harfbuzz.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/i18n/bidi_line_iterator.h" 9 #include "base/i18n/bidi_line_iterator.h"
10 #include "base/i18n/break_iterator.h" 10 #include "base/i18n/break_iterator.h"
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 update_display_run_list_(false), 624 update_display_run_list_(false),
625 update_grapheme_iterator_(false), 625 update_grapheme_iterator_(false),
626 update_display_text_(false), 626 update_display_text_(false),
627 glyph_width_for_test_(0u) { 627 glyph_width_for_test_(0u) {
628 set_truncate_length(kMaxTextLength); 628 set_truncate_length(kMaxTextLength);
629 } 629 }
630 630
631 RenderTextHarfBuzz::~RenderTextHarfBuzz() {} 631 RenderTextHarfBuzz::~RenderTextHarfBuzz() {}
632 632
633 scoped_ptr<RenderText> RenderTextHarfBuzz::CreateInstanceOfSameType() const { 633 scoped_ptr<RenderText> RenderTextHarfBuzz::CreateInstanceOfSameType() const {
634 return scoped_ptr<RenderTextHarfBuzz>(new RenderTextHarfBuzz); 634 return make_scoped_ptr(new RenderTextHarfBuzz);
635 } 635 }
636 636
637 const base::string16& RenderTextHarfBuzz::GetDisplayText() { 637 const base::string16& RenderTextHarfBuzz::GetDisplayText() {
638 // TODO(oshima): Consider supporting eliding multi-line text. 638 // TODO(oshima): Consider supporting eliding multi-line text.
639 // This requires max_line support first. 639 // This requires max_line support first.
640 if (multiline() || 640 if (multiline() ||
641 elide_behavior() == NO_ELIDE || 641 elide_behavior() == NO_ELIDE ||
642 elide_behavior() == FADE_TAIL) { 642 elide_behavior() == FADE_TAIL) {
643 // Call UpdateDisplayText to clear |display_text_| and |text_elided_| 643 // Call UpdateDisplayText to clear |display_text_| and |text_elided_|
644 // on the RenderText class. 644 // on the RenderText class.
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1468 DCHECK(!update_layout_run_list_); 1468 DCHECK(!update_layout_run_list_);
1469 DCHECK(!update_display_run_list_); 1469 DCHECK(!update_display_run_list_);
1470 return text_elided() ? display_run_list_.get() : &layout_run_list_; 1470 return text_elided() ? display_run_list_.get() : &layout_run_list_;
1471 } 1471 }
1472 1472
1473 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const { 1473 const internal::TextRunList* RenderTextHarfBuzz::GetRunList() const {
1474 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList(); 1474 return const_cast<RenderTextHarfBuzz*>(this)->GetRunList();
1475 } 1475 }
1476 1476
1477 } // namespace gfx 1477 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/events/test/test_event_target.cc ('k') | ui/gfx/render_text_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698