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

Unified Diff: webkit/plugins/ppapi/ppb_image_data_impl.h

Issue 11189146: Eliminate implicit conversion from scoped_refptr<T> to T* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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/plugins/ppapi/ppb_graphics_2d_impl.cc ('k') | webkit/plugins/ppapi/ppb_image_data_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_image_data_impl.h
diff --git a/webkit/plugins/ppapi/ppb_image_data_impl.h b/webkit/plugins/ppapi/ppb_image_data_impl.h
index 817b238fcca0b38ff0869b22e0c9a4bfc4c768e6..58f24572ca237bd011276309fa989b7eaceccea8 100644
--- a/webkit/plugins/ppapi/ppb_image_data_impl.h
+++ b/webkit/plugins/ppapi/ppb_image_data_impl.h
@@ -6,6 +6,7 @@
#define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
#include "base/basictypes.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "ppapi/c/ppb_image_data.h"
#include "ppapi/shared_impl/ppb_image_data_shared.h"
@@ -97,7 +98,7 @@ class PPB_ImageData_Impl : public ::ppapi::Resource,
// image_data->mapped_canvas()->blah(); // Guaranteed valid.
class ImageDataAutoMapper {
public:
- explicit ImageDataAutoMapper(PPB_ImageData_Impl* image_data)
+ explicit ImageDataAutoMapper(scoped_refptr<PPB_ImageData_Impl> image_data)
: image_data_(image_data) {
if (image_data_->is_mapped()) {
is_valid_ = true;
@@ -117,7 +118,7 @@ class ImageDataAutoMapper {
bool is_valid() const { return is_valid_; }
private:
- PPB_ImageData_Impl* image_data_;
+ scoped_refptr<PPB_ImageData_Impl> image_data_;
bool is_valid_;
bool needs_unmap_;
« no previous file with comments | « webkit/plugins/ppapi/ppb_graphics_2d_impl.cc ('k') | webkit/plugins/ppapi/ppb_image_data_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698