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

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

Issue 5828003: Move the Pepper implementation from webkit/glue/plugins/pepper_* to... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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_3d_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
===================================================================
--- webkit/plugins/ppapi/ppb_image_data_impl.h (revision 0)
+++ webkit/plugins/ppapi/ppb_image_data_impl.h (working copy)
@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_
-#define WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_
+#ifndef WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
+#define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "ppapi/c/ppb_image_data.h"
-#include "webkit/glue/plugins/pepper_plugin_delegate.h"
-#include "webkit/glue/plugins/pepper_resource.h"
+#include "webkit/plugins/ppapi/plugin_delegate.h"
+#include "webkit/plugins/ppapi/resource.h"
namespace skia {
class PlatformCanvas;
@@ -18,12 +18,13 @@
struct PPB_ImageDataTrusted;
class SkBitmap;
-namespace pepper {
+namespace webkit {
+namespace ppapi {
-class ImageData : public Resource {
+class PPB_ImageData_Impl : public Resource {
public:
- explicit ImageData(PluginModule* module);
- virtual ~ImageData();
+ explicit PPB_ImageData_Impl(PluginModule* module);
+ virtual ~PPB_ImageData_Impl();
int width() const { return width_; }
int height() const { return height_; }
@@ -53,7 +54,7 @@
static bool IsImageDataFormatSupported(PP_ImageDataFormat format);
// Resource overrides.
- virtual ImageData* AsImageData() { return this; }
+ virtual PPB_ImageData_Impl* AsPPB_ImageData_Impl();
// PPB_ImageData implementation.
bool Init(PP_ImageDataFormat format,
@@ -71,10 +72,10 @@
const SkBitmap* GetMappedBitmap() const;
// Swaps the guts of this image data with another.
- void Swap(ImageData* other);
+ void Swap(PPB_ImageData_Impl* other);
private:
- // This will be NULL before initialization, and if this ImageData is
+ // This will be NULL before initialization, and if this PPB_ImageData_Impl is
// swapped with another.
scoped_ptr<PluginDelegate::PlatformImage2D> platform_image_;
@@ -85,7 +86,7 @@
int width_;
int height_;
- DISALLOW_COPY_AND_ASSIGN(ImageData);
+ DISALLOW_COPY_AND_ASSIGN(PPB_ImageData_Impl);
};
// Manages mapping an image resource if necessary. Use this to ensure the
@@ -100,7 +101,8 @@
// image_data->mapped_canvas()->blah(); // Guaranteed valid.
class ImageDataAutoMapper {
public:
- ImageDataAutoMapper(ImageData* image_data) : image_data_(image_data) {
+ ImageDataAutoMapper(PPB_ImageData_Impl* image_data)
+ : image_data_(image_data) {
if (image_data_->is_mapped()) {
is_valid_ = true;
needs_unmap_ = false;
@@ -119,13 +121,14 @@
bool is_valid() const { return is_valid_; }
private:
- ImageData* image_data_;
+ PPB_ImageData_Impl* image_data_;
bool is_valid_;
bool needs_unmap_;
DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper);
};
-} // namespace pepper
+} // namespace ppapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_PEPPER_IMAGE_DATA_H_
+#endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
« no previous file with comments | « webkit/plugins/ppapi/ppb_graphics_3d_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