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

Unified Diff: webkit/api/src/WebImageSkia.cpp

Issue 155172: Start using WebCursorInfo from the WebKit API. WebCursorInfo is a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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
« no previous file with comments | « webkit/api/src/WebImageCG.cpp ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebImageSkia.cpp
===================================================================
--- webkit/api/src/WebImageSkia.cpp (revision 20148)
+++ webkit/api/src/WebImageSkia.cpp (working copy)
@@ -34,6 +34,7 @@
#include "WebData.h"
#include "WebSize.h"
+#include "Image.h"
#include "ImageSourceSkia.h"
#include "NativeImageSkia.h"
#include "SharedBuffer.h"
@@ -78,4 +79,19 @@
return WebSize(m_bitmap.width(), m_bitmap.height());
}
+WebImage::WebImage(const PassRefPtr<Image>& image)
+{
+ operator=(image);
+}
+
+WebImage& WebImage::operator=(const PassRefPtr<Image>& image)
+{
+ NativeImagePtr p;
+ if (image.get() && (p = image->nativeImageForCurrentFrame()))
+ assign(*p);
+ else
+ reset();
+ return *this;
+}
+
} // namespace WebKit
« no previous file with comments | « webkit/api/src/WebImageCG.cpp ('k') | webkit/glue/chrome_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698