| 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 CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 6 #define CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // Informs the plugin that it has gained or lost focus. This is only called in | 70 // Informs the plugin that it has gained or lost focus. This is only called in |
| 71 // windowless mode. | 71 // windowless mode. |
| 72 virtual void SetFocus(bool focused) = 0; | 72 virtual void SetFocus(bool focused) = 0; |
| 73 | 73 |
| 74 // For windowless plugins, gives them a user event like mouse/keyboard. | 74 // For windowless plugins, gives them a user event like mouse/keyboard. |
| 75 // Returns whether the event was handled. This is only called in windowsless | 75 // Returns whether the event was handled. This is only called in windowsless |
| 76 // mode. See NPAPI NPP_HandleEvent for more information. | 76 // mode. See NPAPI NPP_HandleEvent for more information. |
| 77 virtual bool HandleInputEvent(const blink::WebInputEvent& event, | 77 virtual bool HandleInputEvent(const blink::WebInputEvent& event, |
| 78 WebCursor::CursorInfo* cursor) = 0; | 78 WebCursor::CursorInfo* cursor) = 0; |
| 79 | 79 |
| 80 // Gets the NPObject associated with the plugin for scripting. | |
| 81 virtual NPObject* GetPluginScriptableObject() = 0; | |
| 82 | |
| 83 // Gets the NPP instance uniquely identifying the plugin for its lifetime. | |
| 84 virtual struct _NPP* GetPluginNPP() = 0; | |
| 85 | |
| 86 // Gets the form value associated with the plugin instance. | 80 // Gets the form value associated with the plugin instance. |
| 87 // Returns false if the value is not available. | 81 // Returns false if the value is not available. |
| 88 virtual bool GetFormValue(base::string16* value) = 0; | 82 virtual bool GetFormValue(base::string16* value) = 0; |
| 89 | 83 |
| 90 // Returns the process id of the process that is running the plugin. | 84 // Returns the process id of the process that is running the plugin. |
| 91 virtual int GetProcessId() = 0; | 85 virtual int GetProcessId() = 0; |
| 92 }; | 86 }; |
| 93 | 87 |
| 94 } // namespace content | 88 } // namespace content |
| 95 | 89 |
| 96 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ | 90 #endif // CONTENT_CHILD_NPAPI_WEBPLUGIN_DELEGATE_H_ |
| OLD | NEW |