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

Side by Side Diff: ui/views/corewm/tooltip_aura.cc

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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/views/corewm/tooltip_aura.h ('k') | ui/views/corewm/tooltip_controller.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/corewm/tooltip_aura.h" 5 #include "ui/views/corewm/tooltip_aura.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ResetDisplayRect(); 111 ResetDisplayRect();
112 } 112 }
113 113
114 private: 114 private:
115 void ResetDisplayRect() { 115 void ResetDisplayRect() {
116 gfx::Insets insets = border()->GetInsets(); 116 gfx::Insets insets = border()->GetInsets();
117 int max_text_width = max_width_ - insets.width(); 117 int max_text_width = max_width_ - insets.width();
118 render_text_->SetDisplayRect(gfx::Rect(0, 0, max_text_width, 100000)); 118 render_text_->SetDisplayRect(gfx::Rect(0, 0, max_text_width, 100000));
119 } 119 }
120 120
121 scoped_ptr<gfx::RenderText> render_text_; 121 std::unique_ptr<gfx::RenderText> render_text_;
122 int max_width_; 122 int max_width_;
123 123
124 DISALLOW_COPY_AND_ASSIGN(TooltipView); 124 DISALLOW_COPY_AND_ASSIGN(TooltipView);
125 }; 125 };
126 126
127 TooltipAura::TooltipAura() 127 TooltipAura::TooltipAura()
128 : tooltip_view_(new TooltipView), 128 : tooltip_view_(new TooltipView),
129 widget_(NULL), 129 widget_(NULL),
130 tooltip_window_(NULL) { 130 tooltip_window_(NULL) {
131 } 131 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 void TooltipAura::OnWidgetDestroying(views::Widget* widget) { 215 void TooltipAura::OnWidgetDestroying(views::Widget* widget) {
216 DCHECK_EQ(widget_, widget); 216 DCHECK_EQ(widget_, widget);
217 widget_ = NULL; 217 widget_ = NULL;
218 tooltip_window_ = NULL; 218 tooltip_window_ = NULL;
219 } 219 }
220 220
221 } // namespace corewm 221 } // namespace corewm
222 } // namespace views 222 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/corewm/tooltip_aura.h ('k') | ui/views/corewm/tooltip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698