OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
6 #define CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 6 #define CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 virtual void PluginDestroyed() OVERRIDE; | 61 virtual void PluginDestroyed() OVERRIDE; |
62 virtual bool Initialize(const GURL& url, | 62 virtual bool Initialize(const GURL& url, |
63 const std::vector<std::string>& arg_names, | 63 const std::vector<std::string>& arg_names, |
64 const std::vector<std::string>& arg_values, | 64 const std::vector<std::string>& arg_values, |
65 webkit::npapi::WebPlugin* plugin, | 65 webkit::npapi::WebPlugin* plugin, |
66 bool load_manually) OVERRIDE; | 66 bool load_manually) OVERRIDE; |
67 virtual void UpdateGeometry(const gfx::Rect& window_rect, | 67 virtual void UpdateGeometry(const gfx::Rect& window_rect, |
68 const gfx::Rect& clip_rect) OVERRIDE; | 68 const gfx::Rect& clip_rect) OVERRIDE; |
69 virtual void Paint(WebKit::WebCanvas* canvas, const gfx::Rect& rect) OVERRIDE; | 69 virtual void Paint(WebKit::WebCanvas* canvas, const gfx::Rect& rect) OVERRIDE; |
70 virtual NPObject* GetPluginScriptableObject() OVERRIDE; | 70 virtual NPObject* GetPluginScriptableObject() OVERRIDE; |
| 71 virtual struct _NPP* GetPluginNPP() OVERRIDE; |
71 virtual bool GetFormValue(string16* value) OVERRIDE; | 72 virtual bool GetFormValue(string16* value) OVERRIDE; |
72 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, | 73 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, |
73 int notify_id) OVERRIDE; | 74 int notify_id) OVERRIDE; |
74 virtual void SetFocus(bool focused) OVERRIDE; | 75 virtual void SetFocus(bool focused) OVERRIDE; |
75 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 76 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, |
76 WebCursor::CursorInfo* cursor) OVERRIDE; | 77 WebCursor::CursorInfo* cursor) OVERRIDE; |
77 virtual int GetProcessId() OVERRIDE; | 78 virtual int GetProcessId() OVERRIDE; |
78 | 79 |
79 // Informs the plugin that its containing content view has gained or lost | 80 // Informs the plugin that its containing content view has gained or lost |
80 // first responder status. | 81 // first responder status. |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 std::string mime_type_; | 260 std::string mime_type_; |
260 int instance_id_; | 261 int instance_id_; |
261 webkit::WebPluginInfo info_; | 262 webkit::WebPluginInfo info_; |
262 | 263 |
263 gfx::Rect plugin_rect_; | 264 gfx::Rect plugin_rect_; |
264 gfx::Rect clip_rect_; | 265 gfx::Rect clip_rect_; |
265 | 266 |
266 NPObject* npobject_; | 267 NPObject* npobject_; |
267 base::WeakPtr<NPObjectStub> window_script_object_; | 268 base::WeakPtr<NPObjectStub> window_script_object_; |
268 | 269 |
| 270 // Dummy NPP used to uniquely identify this plugin. |
| 271 scoped_ptr<NPP_t> npp_; |
| 272 |
269 // Event passed in by the plugin process and is used to decide if messages | 273 // Event passed in by the plugin process and is used to decide if messages |
270 // need to be pumped in the NPP_HandleEvent sync call. | 274 // need to be pumped in the NPP_HandleEvent sync call. |
271 scoped_ptr<base::WaitableEvent> modal_loop_pump_messages_event_; | 275 scoped_ptr<base::WaitableEvent> modal_loop_pump_messages_event_; |
272 | 276 |
273 // Bitmap for crashed plugin | 277 // Bitmap for crashed plugin |
274 SkBitmap* sad_plugin_; | 278 SkBitmap* sad_plugin_; |
275 | 279 |
276 // True if we got an invalidate from the plugin and are waiting for a paint. | 280 // True if we got an invalidate from the plugin and are waiting for a paint. |
277 bool invalidate_pending_; | 281 bool invalidate_pending_; |
278 | 282 |
(...skipping 14 matching lines...) Expand all Loading... |
293 | 297 |
294 // The url of the main frame hosting the plugin. | 298 // The url of the main frame hosting the plugin. |
295 GURL page_url_; | 299 GURL page_url_; |
296 | 300 |
297 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); | 301 DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateProxy); |
298 }; | 302 }; |
299 | 303 |
300 } // namespace content | 304 } // namespace content |
301 | 305 |
302 #endif // CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ | 306 #endif // CONTENT_RENDERER_WEBPLUGIN_DELEGATE_PROXY_H_ |
OLD | NEW |