Chromium Code Reviews| 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 "third_party/skia/include/core/SkColor.h" | 8 #include "third_party/skia/include/core/SkColor.h" |
| 9 #include "ui/gfx/image/image_skia.h" | 9 #include "ui/gfx/image/image_skia.h" |
| 10 #include "ui/gfx/vector_icons_public.h" | |
| 11 #include "ui/views/view.h" | 10 #include "ui/views/view.h" |
| 12 | 11 |
| 13 namespace gfx { | 12 namespace gfx { |
| 14 class Canvas; | 13 class Canvas; |
| 14 enum class VectorIconId; | |
| 15 } | 15 } |
| 16 | 16 |
| 17 namespace views { | 17 namespace views { |
| 18 | 18 |
| 19 class Painter; | 19 class Painter; |
| 20 | 20 |
| 21 ///////////////////////////////////////////////////////////////////////////// | 21 ///////////////////////////////////////////////////////////////////////////// |
| 22 // | 22 // |
| 23 // ImageView class. | 23 // ImageView class. |
| 24 // | 24 // |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 | 115 |
| 116 // The actual image size. | 116 // The actual image size. |
| 117 gfx::Size image_size_; | 117 gfx::Size image_size_; |
| 118 | 118 |
| 119 // The underlying image. | 119 // The underlying image. |
| 120 gfx::ImageSkia image_; | 120 gfx::ImageSkia image_; |
| 121 | 121 |
| 122 // The ID of the vector icon that should be drawn, or gfx::VECTOR_ICON_NONE. | 122 // The ID of the vector icon that should be drawn, or gfx::VECTOR_ICON_NONE. |
| 123 // This is drawn in addition to |image_|, but in most cases you probably want | 123 // This is drawn in addition to |image_|, but in most cases you probably want |
| 124 // one or the other and not both. | 124 // one or the other and not both. |
| 125 gfx::VectorIconId vector_id_; | 125 int vector_id_; |
|
Nico
2015/07/13 22:06:12
you can probably keep this a gfx::VectorIconId. Si
Evan Stade
2015/07/13 23:20:43
hmm, when I tried this before I got
error: field
| |
| 126 | 126 |
| 127 // The color to use when drawing the vector icon. | 127 // The color to use when drawing the vector icon. |
| 128 SkColor vector_color_; | 128 SkColor vector_color_; |
| 129 | 129 |
| 130 // Horizontal alignment. | 130 // Horizontal alignment. |
| 131 Alignment horiz_alignment_; | 131 Alignment horiz_alignment_; |
| 132 | 132 |
| 133 // Vertical alignment. | 133 // Vertical alignment. |
| 134 Alignment vert_alignment_; | 134 Alignment vert_alignment_; |
| 135 | 135 |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 147 void* last_painted_bitmap_pixels_; | 147 void* last_painted_bitmap_pixels_; |
| 148 | 148 |
| 149 scoped_ptr<views::Painter> focus_painter_; | 149 scoped_ptr<views::Painter> focus_painter_; |
| 150 | 150 |
| 151 DISALLOW_COPY_AND_ASSIGN(ImageView); | 151 DISALLOW_COPY_AND_ASSIGN(ImageView); |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 } // namespace views | 154 } // namespace views |
| 155 | 155 |
| 156 #endif // UI_VIEWS_CONTROLS_IMAGE_VIEW_H_ | 156 #endif // UI_VIEWS_CONTROLS_IMAGE_VIEW_H_ |
| OLD | NEW |