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

Unified Diff: webkit/plugins/ppapi/ppb_flash_impl_linux.cc

Issue 7206016: Convert most remaining resources to use the API/thunk system. The significant (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: webkit/plugins/ppapi/ppb_flash_impl_linux.cc
===================================================================
--- webkit/plugins/ppapi/ppb_flash_impl_linux.cc (revision 89610)
+++ webkit/plugins/ppapi/ppb_flash_impl_linux.cc (working copy)
@@ -8,6 +8,7 @@
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/dev/ppb_font_dev.h"
+#include "ppapi/thunk/enter.h"
#include "third_party/skia/include/core/SkCanvas.h"
#include "third_party/skia/include/core/SkMatrix.h"
#include "third_party/skia/include/core/SkPaint.h"
@@ -17,6 +18,9 @@
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
#include "webkit/plugins/ppapi/var.h"
+using ppapi::thunk::EnterResource;
+using ppapi::thunk::PPB_ImageData_API;
+
namespace webkit {
namespace ppapi {
@@ -30,10 +34,12 @@
uint32_t glyph_count,
const uint16_t glyph_indices[],
const PP_Point glyph_advances[]) {
- scoped_refptr<PPB_ImageData_Impl> image_resource(
- Resource::GetAs<PPB_ImageData_Impl>(pp_image_data));
- if (!image_resource.get())
+ EnterResource<PPB_ImageData_API> enter(pp_image_data, true);
+ if (enter.failed())
return PP_FALSE;
+ PPB_ImageData_Impl* image_resource =
+ static_cast<PPB_ImageData_Impl*>(enter.object());
+
ImageDataAutoMapper mapper(image_resource);
if (!mapper.is_valid())
return PP_FALSE;

Powered by Google App Engine
This is Rietveld 408576698