OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |