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

Side by Side Diff: webkit/glue/plugins/pepper_plugin_instance.h

Issue 2942001: Bring in the latest PPAPI. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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
« no previous file with comments | « DEPS ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 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 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_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/ref_counted.h" 12 #include "base/ref_counted.h"
13 #include "base/scoped_ptr.h"
13 #include "gfx/rect.h" 14 #include "gfx/rect.h"
15 #include "third_party/ppapi/c/pp_cursor_type.h"
14 #include "third_party/ppapi/c/pp_instance.h" 16 #include "third_party/ppapi/c/pp_instance.h"
15 #include "third_party/ppapi/c/pp_resource.h" 17 #include "third_party/ppapi/c/pp_resource.h"
16 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h" 18 #include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
17 19
18 typedef struct _pp_Var PP_Var; 20 typedef struct _pp_Var PP_Var;
19 typedef struct _ppb_Instance PPB_Instance; 21 typedef struct _ppb_Instance PPB_Instance;
20 typedef struct _ppp_Instance PPP_Instance; 22 typedef struct _ppp_Instance PPP_Instance;
21 23
22 namespace gfx { 24 namespace gfx {
23 class Rect; 25 class Rect;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // relative to the top-left of the plugin. This does nothing if the plugin 69 // relative to the top-left of the plugin. This does nothing if the plugin
68 // has not yet been positioned. You can supply an empty gfx::Rect() to 70 // has not yet been positioned. You can supply an empty gfx::Rect() to
69 // invalidate the entire plugin. 71 // invalidate the entire plugin.
70 void InvalidateRect(const gfx::Rect& rect); 72 void InvalidateRect(const gfx::Rect& rect);
71 73
72 // PPB_Instance implementation. 74 // PPB_Instance implementation.
73 PP_Var GetWindowObject(); 75 PP_Var GetWindowObject();
74 PP_Var GetOwnerElementObject(); 76 PP_Var GetOwnerElementObject();
75 bool BindGraphicsDeviceContext(PP_Resource device_id); 77 bool BindGraphicsDeviceContext(PP_Resource device_id);
76 bool full_frame() const { return full_frame_; } 78 bool full_frame() const { return full_frame_; }
79 bool SetCursor(PP_CursorType type);
77 80
78 // PPP_Instance pass-through. 81 // PPP_Instance pass-through.
79 void Delete(); 82 void Delete();
80 bool Initialize(WebKit::WebPluginContainer* container, 83 bool Initialize(WebKit::WebPluginContainer* container,
81 const std::vector<std::string>& arg_names, 84 const std::vector<std::string>& arg_names,
82 const std::vector<std::string>& arg_values, 85 const std::vector<std::string>& arg_values,
83 bool full_frame); 86 bool full_frame);
84 bool HandleDocumentLoad(URLLoader* loader); 87 bool HandleDocumentLoad(URLLoader* loader);
85 bool HandleInputEvent(const WebKit::WebInputEvent& event, 88 bool HandleInputEvent(const WebKit::WebInputEvent& event,
86 WebKit::WebCursorInfo* cursor_info); 89 WebKit::WebCursorInfo* cursor_info);
(...skipping 24 matching lines...) Expand all
111 gfx::Rect position_; 114 gfx::Rect position_;
112 115
113 // Current clip rect. This will be empty if the plugin is not currently 116 // Current clip rect. This will be empty if the plugin is not currently
114 // visible. This is in the plugin's coordinate system, so fully visible will 117 // visible. This is in the plugin's coordinate system, so fully visible will
115 // be (0, 0, w, h) regardless of scroll position. 118 // be (0, 0, w, h) regardless of scroll position.
116 gfx::Rect clip_; 119 gfx::Rect clip_;
117 120
118 // The current device context for painting in 2D. 121 // The current device context for painting in 2D.
119 scoped_refptr<DeviceContext2D> device_context_2d_; 122 scoped_refptr<DeviceContext2D> device_context_2d_;
120 123
124 // Containes the cursor if it's set by the plugin.
125 scoped_ptr<WebKit::WebCursorInfo> cursor_;
126
121 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 127 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
122 }; 128 };
123 129
124 } // namespace pepper 130 } // namespace pepper
125 131
126 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_ 132 #endif // WEBKIT_GLUE_PLUGINS_PEPPER_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « DEPS ('k') | webkit/glue/plugins/pepper_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698