| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // If an isolated world with the specified ID already exists, it is reused. | 99 // If an isolated world with the specified ID already exists, it is reused. |
| 100 // Otherwise, a new world is created. | 100 // Otherwise, a new world is created. |
| 101 // | 101 // |
| 102 // FIXME: Get rid of extensionGroup here. | 102 // FIXME: Get rid of extensionGroup here. |
| 103 // FIXME: We don't want to support multiple scripts. | 103 // FIXME: We don't want to support multiple scripts. |
| 104 void executeScriptInIsolatedWorld(int worldID, const WillBeHeapVector<Script
SourceCode>& sources, int extensionGroup, Vector<v8::Local<v8::Value>>* results)
; | 104 void executeScriptInIsolatedWorld(int worldID, const WillBeHeapVector<Script
SourceCode>& sources, int extensionGroup, Vector<v8::Local<v8::Value>>* results)
; |
| 105 | 105 |
| 106 // Returns true if argument is a JavaScript URL. | 106 // Returns true if argument is a JavaScript URL. |
| 107 bool executeScriptIfJavaScriptURL(const KURL&); | 107 bool executeScriptIfJavaScriptURL(const KURL&); |
| 108 | 108 |
| 109 v8::Local<v8::Value> callFunction(v8::Local<v8::Function>, v8::Local<v8::Val
ue>, int argc, v8::Local<v8::Value> argv[]); | 109 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, v8::Local<v8
::Value>, int argc, v8::Local<v8::Value> argv[]); |
| 110 static v8::Local<v8::Value> callFunction(ExecutionContext*, v8::Local<v8::Fu
nction>, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info[], v
8::Isolate*); | 110 static v8::MaybeLocal<v8::Value> callFunction(ExecutionContext*, v8::Local<v
8::Function>, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> info
[], v8::Isolate*); |
| 111 | 111 |
| 112 // Returns true if the current world is isolated, and has its own Content | 112 // Returns true if the current world is isolated, and has its own Content |
| 113 // Security Policy. In this case, the policy of the main world should be | 113 // Security Policy. In this case, the policy of the main world should be |
| 114 // ignored when evaluating resources injected into the DOM. | 114 // ignored when evaluating resources injected into the DOM. |
| 115 bool shouldBypassMainWorldCSP(); | 115 bool shouldBypassMainWorldCSP(); |
| 116 | 116 |
| 117 // Creates a property of the global object of a frame. | 117 // Creates a property of the global object of a frame. |
| 118 void bindToWindowObject(LocalFrame*, const String& key, NPObject*); | 118 void bindToWindowObject(LocalFrame*, const String& key, NPObject*); |
| 119 | 119 |
| 120 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); | 120 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // invalidate all sub-objects which are associated with that plugin. | 173 // invalidate all sub-objects which are associated with that plugin. |
| 174 // The frame keeps a NPObject reference for each item on the list. | 174 // The frame keeps a NPObject reference for each item on the list. |
| 175 PluginObjectMap m_pluginObjects; | 175 PluginObjectMap m_pluginObjects; |
| 176 | 176 |
| 177 NPObject* m_windowScriptNPObject; | 177 NPObject* m_windowScriptNPObject; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 } // namespace blink | 180 } // namespace blink |
| 181 | 181 |
| 182 #endif // ScriptController_h | 182 #endif // ScriptController_h |
| OLD | NEW |