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

Side by Side Diff: ui/views/controls/image_view.h

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/combobox/combobox_unittest.cc ('k') | ui/views/controls/image_view.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 #ifndef UI_VIEWS_CONTROLS_IMAGE_VIEW_H_ 5 #ifndef UI_VIEWS_CONTROLS_IMAGE_VIEW_H_
6 #define UI_VIEWS_CONTROLS_IMAGE_VIEW_H_ 6 #define UI_VIEWS_CONTROLS_IMAGE_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "third_party/skia/include/core/SkColor.h" 9 #include "third_party/skia/include/core/SkColor.h"
10 #include "ui/gfx/image/image_skia.h" 10 #include "ui/gfx/image/image_skia.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Set / Get the vertical alignment. 70 // Set / Get the vertical alignment.
71 void SetVerticalAlignment(Alignment va); 71 void SetVerticalAlignment(Alignment va);
72 Alignment GetVerticalAlignment() const; 72 Alignment GetVerticalAlignment() const;
73 73
74 // Set / Get the tooltip text. 74 // Set / Get the tooltip text.
75 void SetTooltipText(const base::string16& tooltip); 75 void SetTooltipText(const base::string16& tooltip);
76 base::string16 GetTooltipText() const; 76 base::string16 GetTooltipText() const;
77 77
78 void set_interactive(bool interactive) { interactive_ = interactive; } 78 void set_interactive(bool interactive) { interactive_ = interactive; }
79 79
80 void SetFocusPainter(scoped_ptr<Painter> focus_painter); 80 void SetFocusPainter(std::unique_ptr<Painter> focus_painter);
81 81
82 // Overriden from View: 82 // Overriden from View:
83 gfx::Size GetPreferredSize() const override; 83 gfx::Size GetPreferredSize() const override;
84 void OnFocus() override; 84 void OnFocus() override;
85 void OnBlur() override; 85 void OnBlur() override;
86 void OnPaint(gfx::Canvas* canvas) override; 86 void OnPaint(gfx::Canvas* canvas) override;
87 void GetAccessibleState(ui::AXViewState* state) override; 87 void GetAccessibleState(ui::AXViewState* state) override;
88 const char* GetClassName() const override; 88 const char* GetClassName() const override;
89 bool GetTooltipText(const gfx::Point& p, 89 bool GetTooltipText(const gfx::Point& p,
90 base::string16* tooltip) const override; 90 base::string16* tooltip) const override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // A flag controlling hit test handling for interactivity. 126 // A flag controlling hit test handling for interactivity.
127 bool interactive_; 127 bool interactive_;
128 128
129 // Scale last painted at. 129 // Scale last painted at.
130 float last_paint_scale_; 130 float last_paint_scale_;
131 131
132 // Address of bytes we last painted. This is used only for comparison, so its 132 // Address of bytes we last painted. This is used only for comparison, so its
133 // safe to cache. 133 // safe to cache.
134 void* last_painted_bitmap_pixels_; 134 void* last_painted_bitmap_pixels_;
135 135
136 scoped_ptr<views::Painter> focus_painter_; 136 std::unique_ptr<views::Painter> focus_painter_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(ImageView); 138 DISALLOW_COPY_AND_ASSIGN(ImageView);
139 }; 139 };
140 140
141 } // namespace views 141 } // namespace views
142 142
143 #endif // UI_VIEWS_CONTROLS_IMAGE_VIEW_H_ 143 #endif // UI_VIEWS_CONTROLS_IMAGE_VIEW_H_
OLDNEW
« no previous file with comments | « ui/views/controls/combobox/combobox_unittest.cc ('k') | ui/views/controls/image_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698