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

Side by Side Diff: ui/views/controls/button/image_button.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/controls/button/image_button.h ('k') | ui/views/controls/button/label_button.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 (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/views/controls/button/image_button.h" 5 #include "ui/views/controls/button/image_button.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/accessibility/ax_view_state.h" 10 #include "ui/accessibility/ax_view_state.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 *image, *mask); 66 *image, *mask);
67 } 67 }
68 68
69 void ImageButton::SetImageAlignment(HorizontalAlignment h_align, 69 void ImageButton::SetImageAlignment(HorizontalAlignment h_align,
70 VerticalAlignment v_align) { 70 VerticalAlignment v_align) {
71 h_alignment_ = h_align; 71 h_alignment_ = h_align;
72 v_alignment_ = v_align; 72 v_alignment_ = v_align;
73 SchedulePaint(); 73 SchedulePaint();
74 } 74 }
75 75
76 void ImageButton::SetFocusPainter(scoped_ptr<Painter> focus_painter) { 76 void ImageButton::SetFocusPainter(std::unique_ptr<Painter> focus_painter) {
77 focus_painter_ = std::move(focus_painter); 77 focus_painter_ = std::move(focus_painter);
78 } 78 }
79 79
80 void ImageButton::SetMinimumImageSize(const gfx::Size& size) { 80 void ImageButton::SetMinimumImageSize(const gfx::Size& size) {
81 if (minimum_image_size_ == size) 81 if (minimum_image_size_ == size)
82 return; 82 return;
83 83
84 minimum_image_size_ = size; 84 minimum_image_size_ = size;
85 PreferredSizeChanged(); 85 PreferredSizeChanged();
86 } 86 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 *tooltip = toggled_tooltip_text_; 266 *tooltip = toggled_tooltip_text_;
267 return true; 267 return true;
268 } 268 }
269 269
270 void ToggleImageButton::GetAccessibleState(ui::AXViewState* state) { 270 void ToggleImageButton::GetAccessibleState(ui::AXViewState* state) {
271 ImageButton::GetAccessibleState(state); 271 ImageButton::GetAccessibleState(state);
272 GetTooltipText(gfx::Point(), &state->name); 272 GetTooltipText(gfx::Point(), &state->name);
273 } 273 }
274 274
275 } // namespace views 275 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/button/image_button.h ('k') | ui/views/controls/button/label_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698