OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 virtual void invalidateRect(const WebRect&) = 0; | 65 virtual void invalidateRect(const WebRect&) = 0; |
66 virtual void scrollRect(const WebRect&) = 0; | 66 virtual void scrollRect(const WebRect&) = 0; |
67 | 67 |
68 // Schedules an animation of the WebView that contains the plugin, as well a
s the plugin. | 68 // Schedules an animation of the WebView that contains the plugin, as well a
s the plugin. |
69 virtual void scheduleAnimation() = 0; | 69 virtual void scheduleAnimation() = 0; |
70 | 70 |
71 // Causes the container to report its current geometry via | 71 // Causes the container to report its current geometry via |
72 // WebPlugin::updateGeometry. | 72 // WebPlugin::updateGeometry. |
73 virtual void reportGeometry() = 0; | 73 virtual void reportGeometry() = 0; |
74 | 74 |
75 // Allow the plugin to pass script objects to the browser. The container | |
76 // tracks ownership of script objects in order to allow browser references | |
77 // to them to be dropped when clearScriptObjects is called. | |
78 virtual void allowScriptObjects() = 0; | |
79 | |
80 // Drop any references to script objects allocated by the plugin. | |
81 // These are objects derived from WebPlugin::scriptableObject. This is | |
82 // called when the plugin is being destroyed or if it needs to be | |
83 // re-initialized. | |
84 virtual void clearScriptObjects() = 0; | |
85 | |
86 // Returns the scriptable object associated with the DOM element | |
87 // containing the plugin. | |
88 virtual NPObject* scriptableObjectForElement() = 0; | |
89 | |
90 // Returns the scriptable object associated with the DOM element | 75 // Returns the scriptable object associated with the DOM element |
91 // containing the plugin as a native v8 object. | 76 // containing the plugin as a native v8 object. |
92 virtual v8::Local<v8::Object> v8ObjectForElement() = 0; | 77 virtual v8::Local<v8::Object> v8ObjectForElement() = 0; |
93 | 78 |
94 // Executes a "javascript:" URL on behalf of the plugin in the context | 79 // Executes a "javascript:" URL on behalf of the plugin in the context |
95 // of the frame containing the plugin. Returns the result of script | 80 // of the frame containing the plugin. Returns the result of script |
96 // execution, if any. | 81 // execution, if any. |
97 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; | 82 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; |
98 | 83 |
99 // Loads an URL in the specified frame (or the frame containing this | 84 // Loads an URL in the specified frame (or the frame containing this |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 // WebPluginContainer does *not* take ownership. | 126 // WebPluginContainer does *not* take ownership. |
142 virtual void setWebLayer(WebLayer*) = 0; | 127 virtual void setWebLayer(WebLayer*) = 0; |
143 | 128 |
144 protected: | 129 protected: |
145 ~WebPluginContainer() { } | 130 ~WebPluginContainer() { } |
146 }; | 131 }; |
147 | 132 |
148 } // namespace blink | 133 } // namespace blink |
149 | 134 |
150 #endif | 135 #endif |
OLD | NEW |