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

Unified Diff: ui/views/controls/image_view.h

Issue 10437006: Converts ui/views/controls, ui/views/examples, ui/base/models to ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/image_view.h
diff --git a/ui/views/controls/image_view.h b/ui/views/controls/image_view.h
index 7c90fd8df2b80465664fe4a14a98809404047cd9..5aa1553f66d6230a8926b3dc69c0cfeac519a199 100644
--- a/ui/views/controls/image_view.h
+++ b/ui/views/controls/image_view.h
@@ -6,7 +6,6 @@
#define UI_VIEWS_CONTROLS_IMAGE_VIEW_H_
#pragma once
-#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/views/view.h"
@@ -20,7 +19,7 @@ namespace views {
//
// ImageView class.
//
-// An ImageView can display an image from an SkBitmap. If a size is provided,
+// An ImageView can display an image from an ImageSkia. If a size is provided,
// the ImageView will resize the provided image to fit if it is too big or will
// center the image if smaller. Otherwise, the preferred size matches the
// provided image size.
@@ -37,17 +36,17 @@ class VIEWS_EXPORT ImageView : public View {
ImageView();
virtual ~ImageView();
- // Set the bitmap that should be displayed.
- void SetImage(const SkBitmap& bm);
+ // Set the image that should be displayed.
+ void SetImage(const gfx::ImageSkia& img);
// Set the image that should be displayed from a pointer. Reset the image
// if the pointer is NULL. The pointer contents is copied in the receiver's
- // bitmap.
+ // image.
void SetImage(const gfx::ImageSkia* image_skia);
- // Returns the bitmap currently displayed or NULL of none is currently set.
- // The returned bitmap is still owned by the ImageView.
- const SkBitmap& GetImage();
+ // Returns the image currently displayed or NULL of none is currently set.
+ // The returned image is still owned by the ImageView.
+ const gfx::ImageSkia& GetImage();
// Set the desired image size for the receiving ImageView.
void SetImageSize(const gfx::Size& image_size);
@@ -93,8 +92,8 @@ class VIEWS_EXPORT ImageView : public View {
// The actual image size.
gfx::Size image_size_;
- // The underlying bitmap.
- SkBitmap image_;
+ // The underlying image.
+ gfx::ImageSkia image_;
// Horizontal alignment.
Alignment horiz_alignment_;

Powered by Google App Engine
This is Rietveld 408576698