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

Side by Side Diff: webkit/plugins/ppapi/ppb_image_data_impl.h

Issue 7669055: Remove webkit::ppapi::Resource. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix self-assignment Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ppapi/c/ppb_image_data.h" 10 #include "ppapi/c/ppb_image_data.h"
11 #include "ppapi/shared_impl/image_data_impl.h" 11 #include "ppapi/shared_impl/image_data_impl.h"
12 #include "ppapi/shared_impl/resource.h"
12 #include "ppapi/thunk/ppb_image_data_api.h" 13 #include "ppapi/thunk/ppb_image_data_api.h"
13 #include "webkit/plugins/ppapi/plugin_delegate.h" 14 #include "webkit/plugins/ppapi/plugin_delegate.h"
14 #include "webkit/plugins/ppapi/resource.h"
15 15
16 namespace skia { 16 namespace skia {
17 class PlatformCanvas; 17 class PlatformCanvas;
18 } 18 }
19 19
20 struct PPB_ImageDataTrusted; 20 struct PPB_ImageDataTrusted;
21 class SkBitmap; 21 class SkBitmap;
22 22
23 namespace webkit { 23 namespace webkit {
24 namespace ppapi { 24 namespace ppapi {
25 25
26 class PPB_ImageData_Impl : public Resource, 26 class PPB_ImageData_Impl : public ::ppapi::Resource,
27 public ::ppapi::ImageDataImpl, 27 public ::ppapi::ImageDataImpl,
28 public ::ppapi::thunk::PPB_ImageData_API { 28 public ::ppapi::thunk::PPB_ImageData_API {
29 public: 29 public:
30 // If you call this constructor, you must also call Init before use. Normally 30 // If you call this constructor, you must also call Init before use. Normally
31 // you should use the static Create function, but this constructor is needed 31 // you should use the static Create function, but this constructor is needed
32 // for some internal uses of ImageData (like Graphics2D). 32 // for some internal uses of ImageData (like Graphics2D).
33 explicit PPB_ImageData_Impl(PluginInstance* instance); 33 explicit PPB_ImageData_Impl(PP_Instance instance);
34 virtual ~PPB_ImageData_Impl(); 34 virtual ~PPB_ImageData_Impl();
35 35
36 static PP_Resource Create(PluginInstance* pp_instance, 36 static PP_Resource Create(PP_Instance pp_instance,
37 PP_ImageDataFormat format, 37 PP_ImageDataFormat format,
38 const PP_Size& size, 38 const PP_Size& size,
39 PP_Bool init_to_zero); 39 PP_Bool init_to_zero);
40 40
41 bool Init(PP_ImageDataFormat format, 41 bool Init(PP_ImageDataFormat format,
42 int width, int height, 42 int width, int height,
43 bool init_to_zero); 43 bool init_to_zero);
44 44
45 int width() const { return width_; } 45 int width() const { return width_; }
46 int height() const { return height_; } 46 int height() const { return height_; }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 PPB_ImageData_Impl* image_data_; 121 PPB_ImageData_Impl* image_data_;
122 bool is_valid_; 122 bool is_valid_;
123 bool needs_unmap_; 123 bool needs_unmap_;
124 124
125 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper); 125 DISALLOW_COPY_AND_ASSIGN(ImageDataAutoMapper);
126 }; 126 };
127 127
128 } // namespace ppapi 128 } // namespace ppapi
129 } // namespace webkit 129 } // namespace webkit
130 130
131 #endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_ 131 #endif // WEBKIT_PLUGINS_PPAPI_PPB_IMAGE_DATA_IMPL_H_
viettrungluu 2011/08/22 23:19:47 I got here before getting bored.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698