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

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

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments 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_WIDGET_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_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/pp_rect.h" 10 #include "ppapi/c/pp_rect.h"
(...skipping 14 matching lines...) Expand all
25 25
26 class PPB_ImageData_Impl; 26 class PPB_ImageData_Impl;
27 class PluginInstance; 27 class PluginInstance;
28 28
29 class PPB_Widget_Impl : public Resource, 29 class PPB_Widget_Impl : public Resource,
30 public ::ppapi::thunk::PPB_Widget_API { 30 public ::ppapi::thunk::PPB_Widget_API {
31 public: 31 public:
32 explicit PPB_Widget_Impl(PluginInstance* instance); 32 explicit PPB_Widget_Impl(PluginInstance* instance);
33 virtual ~PPB_Widget_Impl(); 33 virtual ~PPB_Widget_Impl();
34 34
35 // ResourceObjectBase overrides. 35 // Resource overrides.
36 virtual ::ppapi::thunk::PPB_Widget_API* AsPPB_Widget_API() OVERRIDE; 36 virtual ::ppapi::thunk::PPB_Widget_API* AsPPB_Widget_API() OVERRIDE;
37 37
38 // PPB_WidgetAPI implementation. 38 // PPB_WidgetAPI implementation.
39 virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource ) OVERRIDE; 39 virtual PP_Bool Paint(const PP_Rect* rect, PP_Resource ) OVERRIDE;
40 virtual PP_Bool HandleEvent(PP_Resource pp_input_event) OVERRIDE; 40 virtual PP_Bool HandleEvent(PP_Resource pp_input_event) OVERRIDE;
41 virtual PP_Bool GetLocation(PP_Rect* location) OVERRIDE; 41 virtual PP_Bool GetLocation(PP_Rect* location) OVERRIDE;
42 virtual void SetLocation(const PP_Rect* location) OVERRIDE; 42 virtual void SetLocation(const PP_Rect* location) OVERRIDE;
43 43
44 // Notifies the plugin instance that the given rect needs to be repainted. 44 // Notifies the plugin instance that the given rect needs to be repainted.
45 void Invalidate(const PP_Rect* dirty); 45 void Invalidate(const PP_Rect* dirty);
46 46
47 protected: 47 protected:
48 virtual PP_Bool PaintInternal(const gfx::Rect& rect, 48 virtual PP_Bool PaintInternal(const gfx::Rect& rect,
49 PPB_ImageData_Impl* image) = 0; 49 PPB_ImageData_Impl* image) = 0;
50 virtual PP_Bool HandleEventInternal(const ::ppapi::InputEventData& data) = 0; 50 virtual PP_Bool HandleEventInternal(const ::ppapi::InputEventData& data) = 0;
51 virtual void SetLocationInternal(const PP_Rect* location) = 0; 51 virtual void SetLocationInternal(const PP_Rect* location) = 0;
52 52
53 PP_Rect location() const { return location_; } 53 PP_Rect location() const { return location_; }
54 54
55 private: 55 private:
56 PP_Rect location_; 56 PP_Rect location_;
57 57
58 DISALLOW_COPY_AND_ASSIGN(PPB_Widget_Impl); 58 DISALLOW_COPY_AND_ASSIGN(PPB_Widget_Impl);
59 }; 59 };
60 60
61 } // namespace ppapi 61 } // namespace ppapi
62 } // namespace webkit 62 } // namespace webkit
63 63
64 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_ 64 #endif // WEBKIT_PLUGINS_PPAPI_PPB_WIDGET_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698