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

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

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
« no previous file with comments | « webkit/plugins/ppapi/ppb_video_decoder_impl.cc ('k') | webkit/plugins/ppapi/ppb_widget_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_widget_impl.h
===================================================================
--- webkit/plugins/ppapi/ppb_widget_impl.h (revision 89672)
+++ webkit/plugins/ppapi/ppb_widget_impl.h (working copy)
@@ -8,40 +8,45 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "ppapi/c/pp_rect.h"
+#include "ppapi/thunk/ppb_widget_api.h"
#include "webkit/plugins/ppapi/resource.h"
struct PPB_Widget_Dev;
struct PP_InputEvent;
+namespace gfx {
+class Rect;
+}
+
namespace webkit {
namespace ppapi {
-class PPB_ImageData_Impla;
+class PPB_ImageData_Impl;
class PluginInstance;
-class PPB_Widget_Impl : public Resource {
+class PPB_Widget_Impl : public Resource,
+ public ::ppapi::thunk::PPB_Widget_API {
public:
explicit PPB_Widget_Impl(PluginInstance* instance);
virtual ~PPB_Widget_Impl();
- // Returns a pointer to the interface implementing PPB_Widget that is
- // exposed to the plugin.
- static const PPB_Widget_Dev* GetInterface();
+ // ResourceObjectBase overrides.
+ virtual ::ppapi::thunk::PPB_Widget_API* AsPPB_Widget_API() OVERRIDE;
- // Resource overrides.
- virtual PPB_Widget_Impl* AsPPB_Widget_Impl();
+ // PPB_WidgetAPI implementation.
+ virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource ) OVERRIDE;
+ virtual PP_Bool HandleEvent(const PP_InputEvent* event) = 0;
+ virtual PP_Bool GetLocation(PP_Rect* location) OVERRIDE;
+ virtual void SetLocation(const PP_Rect* location) OVERRIDE;
- // PPB_Widget implementation.
- virtual bool Paint(const PP_Rect* rect, PPB_ImageData_Impl* image) = 0;
- virtual bool HandleEvent(const PP_InputEvent* event) = 0;
- bool GetLocation(PP_Rect* location);
- void SetLocation(const PP_Rect* location);
-
// Notifies the plugin instance that the given rect needs to be repainted.
void Invalidate(const PP_Rect* dirty);
protected:
+ virtual PP_Bool PaintInternal(const gfx::Rect& rect,
+ PPB_ImageData_Impl* image) = 0;
virtual void SetLocationInternal(const PP_Rect* location) = 0;
+
PP_Rect location() const { return location_; }
private:
« no previous file with comments | « webkit/plugins/ppapi/ppb_video_decoder_impl.cc ('k') | webkit/plugins/ppapi/ppb_widget_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698