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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // Causes the container to be marked as needing layout, which in turn will c
ause | 68 // Causes the container to be marked as needing layout, which in turn will c
ause |
69 // layoutIfNeeded() to be called on any contained WebPlugin during the conta
iner's | 69 // layoutIfNeeded() to be called on any contained WebPlugin during the conta
iner's |
70 // web view's lifecycle update, and in particular before calling paint() on
the | 70 // web view's lifecycle update, and in particular before calling paint() on
the |
71 // WebPlugin. | 71 // WebPlugin. |
72 virtual void setNeedsLayout() = 0; | 72 virtual void setNeedsLayout() = 0; |
73 | 73 |
74 // Causes the container to report its current geometry via | 74 // Causes the container to report its current geometry via |
75 // WebPlugin::updateGeometry. | 75 // WebPlugin::updateGeometry. |
76 virtual void reportGeometry() = 0; | 76 virtual void reportGeometry() = 0; |
77 | 77 |
78 // Allow the plugin to pass script objects to the browser. The container | |
79 // tracks ownership of script objects in order to allow browser references | |
80 // to them to be dropped when clearScriptObjects is called. | |
81 virtual void allowScriptObjects() = 0; | |
82 | |
83 // Drop any references to script objects allocated by the plugin. | |
84 // These are objects derived from WebPlugin::scriptableObject. This is | |
85 // called when the plugin is being destroyed or if it needs to be | |
86 // re-initialized. | |
87 virtual void clearScriptObjects() = 0; | |
88 | |
89 // Returns the scriptable object associated with the DOM element | |
90 // containing the plugin. | |
91 virtual NPObject* scriptableObjectForElement() = 0; | |
92 | |
93 // Returns the scriptable object associated with the DOM element | 78 // Returns the scriptable object associated with the DOM element |
94 // containing the plugin as a native v8 object. | 79 // containing the plugin as a native v8 object. |
95 virtual v8::Local<v8::Object> v8ObjectForElement() = 0; | 80 virtual v8::Local<v8::Object> v8ObjectForElement() = 0; |
96 | 81 |
97 // Executes a "javascript:" URL on behalf of the plugin in the context | 82 // Executes a "javascript:" URL on behalf of the plugin in the context |
98 // of the frame containing the plugin. Returns the result of script | 83 // of the frame containing the plugin. Returns the result of script |
99 // execution, if any. | 84 // execution, if any. |
100 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; | 85 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; |
101 | 86 |
102 // Loads an URL in the specified frame (or the frame containing this | 87 // 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... |
144 // WebPluginContainer does *not* take ownership. | 129 // WebPluginContainer does *not* take ownership. |
145 virtual void setWebLayer(WebLayer*) = 0; | 130 virtual void setWebLayer(WebLayer*) = 0; |
146 | 131 |
147 protected: | 132 protected: |
148 ~WebPluginContainer() { } | 133 ~WebPluginContainer() { } |
149 }; | 134 }; |
150 | 135 |
151 } // namespace blink | 136 } // namespace blink |
152 | 137 |
153 #endif | 138 #endif |
OLD | NEW |