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

Side by Side Diff: webkit/glue/plugins/pepper_widget.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/pepper_webplugin_impl.cc ('k') | webkit/glue/plugins/pepper_widget.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_WIDGET_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_WIDGET_H_
7
8 #include "base/scoped_ptr.h"
9 #include "ppapi/c/pp_rect.h"
10 #include "webkit/glue/plugins/pepper_resource.h"
11
12 struct PPB_Widget_Dev;
13 struct PP_InputEvent;
14
15 namespace pepper {
16
17 class ImageData;
18 class PluginInstance;
19
20 class Widget : public Resource {
21 public:
22 explicit Widget(PluginInstance* instance);
23 virtual ~Widget();
24
25 // Returns a pointer to the interface implementing PPB_Widget that is
26 // exposed to the plugin.
27 static const PPB_Widget_Dev* GetInterface();
28
29 // Resource overrides.
30 virtual Widget* AsWidget();
31
32 // PPB_Widget implementation.
33 virtual bool Paint(const PP_Rect* rect, ImageData* image) = 0;
34 virtual bool HandleEvent(const PP_InputEvent* event) = 0;
35 bool GetLocation(PP_Rect* location);
36 void SetLocation(const PP_Rect* location);
37
38 // Notifies the plugin instance that the given rect needs to be repainted.
39 void Invalidate(const PP_Rect* dirty);
40 PluginInstance* instance() { return instance_; }
41
42 protected:
43 virtual void SetLocationInternal(const PP_Rect* location) = 0;
44 PP_Rect location() const { return location_; }
45
46 private:
47 scoped_refptr<PluginInstance> instance_;
48 PP_Rect location_;
49 };
50
51 } // namespace pepper
52
53 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_WIDGET_H_
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_webplugin_impl.cc ('k') | webkit/glue/plugins/pepper_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698