| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class WebString; | 37 class WebString; |
| 38 class WebURL; | 38 class WebURL; |
| 39 class WebURLRequest; | 39 class WebURLRequest; |
| 40 struct WebRect; | 40 struct WebRect; |
| 41 | 41 |
| 42 class WebPluginContainer { | 42 class WebPluginContainer { |
| 43 public: | 43 public: |
| 44 virtual void invalidate() = 0; | 44 virtual void invalidate() = 0; |
| 45 virtual void invalidateRect(const WebRect&) = 0; | 45 virtual void invalidateRect(const WebRect&) = 0; |
| 46 | 46 |
| 47 // Causes the container to report its current geometry via |
| 48 // WebPlugin::updateGeometry. |
| 49 virtual void reportGeometry() = 0; |
| 50 |
| 51 // Drop any references to script objects allocated by the plugin. |
| 52 // These are objects derived from WebPlugin::scriptableObject. This is |
| 53 // called when the plugin is being destroyed or if it needs to be |
| 54 // re-initialized. |
| 55 virtual void clearScriptObjects() = 0; |
| 56 |
| 47 // Returns the scriptable object associated with the DOM element | 57 // Returns the scriptable object associated with the DOM element |
| 48 // containing the plugin. | 58 // containing the plugin. |
| 49 virtual NPObject* scriptableObjectForElement() = 0; | 59 virtual NPObject* scriptableObjectForElement() = 0; |
| 50 | 60 |
| 51 // Executes a "javascript:" URL on behalf of the plugin in the context | 61 // Executes a "javascript:" URL on behalf of the plugin in the context |
| 52 // of the frame containing the plugin. Returns the result of script | 62 // of the frame containing the plugin. Returns the result of script |
| 53 // execution, if any. | 63 // execution, if any. |
| 54 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; | 64 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; |
| 55 | 65 |
| 56 // Loads an URL in the specified frame (or the frame containing this | 66 // Loads an URL in the specified frame (or the frame containing this |
| 57 // plugin if target is empty). If notifyNeeded is true, then upon | 67 // plugin if target is empty). If notifyNeeded is true, then upon |
| 58 // completion, WebPlugin::didFinishLoadingFrameRequest is called if the | 68 // completion, WebPlugin::didFinishLoadingFrameRequest is called if the |
| 59 // load was successful or WebPlugin::didFailLoadingFrameRequest is | 69 // load was successful or WebPlugin::didFailLoadingFrameRequest is |
| 60 // called if the load failed. The given notifyData is passed along to | 70 // called if the load failed. The given notifyData is passed along to |
| 61 // the callback. | 71 // the callback. |
| 62 virtual void loadFrameRequest( | 72 virtual void loadFrameRequest( |
| 63 const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0; | 73 const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0; |
| 64 | 74 |
| 65 protected: | 75 protected: |
| 66 ~WebPluginContainer() { } | 76 ~WebPluginContainer() { } |
| 67 }; | 77 }; |
| 68 | 78 |
| 69 } // namespace WebKit | 79 } // namespace WebKit |
| 70 | 80 |
| 71 #endif | 81 #endif |
| OLD | NEW |