OLD | NEW |
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_NPAPI_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ |
6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 // For windowless plugins, gives them a user event like mouse/keyboard. | 77 // For windowless plugins, gives them a user event like mouse/keyboard. |
78 // Returns whether the event was handled. This is only called in windowsless | 78 // Returns whether the event was handled. This is only called in windowsless |
79 // mode. See NPAPI NPP_HandleEvent for more information. | 79 // mode. See NPAPI NPP_HandleEvent for more information. |
80 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, | 80 virtual bool HandleInputEvent(const WebKit::WebInputEvent& event, |
81 WebCursor::CursorInfo* cursor) = 0; | 81 WebCursor::CursorInfo* cursor) = 0; |
82 | 82 |
83 // Gets the NPObject associated with the plugin for scripting. | 83 // Gets the NPObject associated with the plugin for scripting. |
84 virtual NPObject* GetPluginScriptableObject() = 0; | 84 virtual NPObject* GetPluginScriptableObject() = 0; |
85 | 85 |
| 86 // Gets the NPP instance uniquely identifying the plugin for its lifetime. |
| 87 virtual struct _NPP* GetPluginNPP() = 0; |
| 88 |
86 // Gets the form value associated with the plugin instance. | 89 // Gets the form value associated with the plugin instance. |
87 // Returns false if the value is not available. | 90 // Returns false if the value is not available. |
88 virtual bool GetFormValue(base::string16* value) = 0; | 91 virtual bool GetFormValue(base::string16* value) = 0; |
89 | 92 |
90 // Receives notification about a resource load that the plugin initiated | 93 // Receives notification about a resource load that the plugin initiated |
91 // for a frame. | 94 // for a frame. |
92 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, | 95 virtual void DidFinishLoadWithReason(const GURL& url, NPReason reason, |
93 int notify_id) = 0; | 96 int notify_id) = 0; |
94 | 97 |
95 // Returns the process id of the process that is running the plugin. | 98 // Returns the process id of the process that is running the plugin. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Creates a WebPluginResourceClient instance for an existing stream that is | 130 // Creates a WebPluginResourceClient instance for an existing stream that is |
128 // has become seekable. | 131 // has become seekable. |
129 virtual WebPluginResourceClient* CreateSeekableResourceClient( | 132 virtual WebPluginResourceClient* CreateSeekableResourceClient( |
130 unsigned long resource_id, int range_request_id) = 0; | 133 unsigned long resource_id, int range_request_id) = 0; |
131 }; | 134 }; |
132 | 135 |
133 } // namespace npapi | 136 } // namespace npapi |
134 } // namespace webkit | 137 } // namespace webkit |
135 | 138 |
136 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ | 139 #endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_ |
OLD | NEW |