Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Side by Side Diff: public/web/WebPluginContainer.h

Issue 230813002: Make it possible to have <object>'s scriptableObject as a v8 object instead of NPObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes after code review. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * 4 *
4 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
6 * met: 7 * met:
7 * 8 *
8 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 11 * * Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following disclaimer 12 * copyright notice, this list of conditions and the following disclaimer
12 * in the documentation and/or other materials provided with the 13 * in the documentation and/or other materials provided with the
(...skipping 15 matching lines...) Expand all
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 30 */
30 31
31 #ifndef WebPluginContainer_h 32 #ifndef WebPluginContainer_h
32 #define WebPluginContainer_h 33 #define WebPluginContainer_h
33 34
34 #include "../platform/WebCommon.h" 35 #include "../platform/WebCommon.h"
35 36
36 struct NPObject; 37 struct NPObject;
37 38
39 namespace v8 {
40 template <typename T> class Local;
41 class Isolate;
42 class Object;
43 }
abarth-chromium 2014/07/30 17:52:25 I'd just #include <v8.h>
Krzysztof Olczyk 2014/07/31 06:28:48 Done.
44
38 namespace blink { 45 namespace blink {
39 46
40 class WebElement; 47 class WebElement;
41 class WebPlugin; 48 class WebPlugin;
42 class WebString; 49 class WebString;
43 class WebURL; 50 class WebURL;
44 class WebURLRequest; 51 class WebURLRequest;
45 class WebLayer; 52 class WebLayer;
46 struct WebPoint; 53 struct WebPoint;
47 struct WebRect; 54 struct WebRect;
(...skipping 25 matching lines...) Expand all
73 // Drop any references to script objects allocated by the plugin. 80 // Drop any references to script objects allocated by the plugin.
74 // These are objects derived from WebPlugin::scriptableObject. This is 81 // These are objects derived from WebPlugin::scriptableObject. This is
75 // called when the plugin is being destroyed or if it needs to be 82 // called when the plugin is being destroyed or if it needs to be
76 // re-initialized. 83 // re-initialized.
77 virtual void clearScriptObjects() = 0; 84 virtual void clearScriptObjects() = 0;
78 85
79 // Returns the scriptable object associated with the DOM element 86 // Returns the scriptable object associated with the DOM element
80 // containing the plugin. 87 // containing the plugin.
81 virtual NPObject* scriptableObjectForElement() = 0; 88 virtual NPObject* scriptableObjectForElement() = 0;
82 89
90 // Returns the scriptable object associated with the DOM element
91 // containing the plugin as a native v8 object.
92 virtual v8::Local<v8::Object> v8ObjectForElement() = 0;
93
83 // Executes a "javascript:" URL on behalf of the plugin in the context 94 // Executes a "javascript:" URL on behalf of the plugin in the context
84 // of the frame containing the plugin. Returns the result of script 95 // of the frame containing the plugin. Returns the result of script
85 // execution, if any. 96 // execution, if any.
86 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0; 97 virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed) = 0;
87 98
88 // Loads an URL in the specified frame (or the frame containing this 99 // Loads an URL in the specified frame (or the frame containing this
89 // plugin if target is empty). If notifyNeeded is true, then upon 100 // plugin if target is empty). If notifyNeeded is true, then upon
90 // completion, WebPlugin::didFinishLoadingFrameRequest is called if the 101 // completion, WebPlugin::didFinishLoadingFrameRequest is called if the
91 // load was successful or WebPlugin::didFailLoadingFrameRequest is 102 // load was successful or WebPlugin::didFailLoadingFrameRequest is
92 // called if the load failed. The given notifyData is passed along to 103 // called if the load failed. The given notifyData is passed along to
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // WebPluginContainer does *not* take ownership. 139 // WebPluginContainer does *not* take ownership.
129 virtual void setWebLayer(WebLayer*) = 0; 140 virtual void setWebLayer(WebLayer*) = 0;
130 141
131 protected: 142 protected:
132 ~WebPluginContainer() { } 143 ~WebPluginContainer() { }
133 }; 144 };
134 145
135 } // namespace blink 146 } // namespace blink
136 147
137 #endif 148 #endif
OLDNEW
« Source/web/WebPluginContainerImpl.cpp ('K') | « public/web/WebPlugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698