| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // If an isolated world with the specified ID already exists, it is reused. | 96 // If an isolated world with the specified ID already exists, it is reused. |
| 97 // Otherwise, a new world is created. | 97 // Otherwise, a new world is created. |
| 98 // | 98 // |
| 99 // FIXME: Get rid of extensionGroup here. | 99 // FIXME: Get rid of extensionGroup here. |
| 100 // FIXME: We don't want to support multiple scripts. | 100 // FIXME: We don't want to support multiple scripts. |
| 101 void executeScriptInIsolatedWorld(int worldID, const HeapVector<ScriptSource
Code>& sources, int extensionGroup, Vector<v8::Local<v8::Value>>* results); | 101 void executeScriptInIsolatedWorld(int worldID, const HeapVector<ScriptSource
Code>& sources, int extensionGroup, Vector<v8::Local<v8::Value>>* results); |
| 102 | 102 |
| 103 // Returns true if argument is a JavaScript URL. | 103 // Returns true if argument is a JavaScript URL. |
| 104 bool executeScriptIfJavaScriptURL(const KURL&); | 104 bool executeScriptIfJavaScriptURL(const KURL&); |
| 105 | 105 |
| 106 v8::MaybeLocal<v8::Value> callFunction(v8::Local<v8::Function>, v8::Local<v8
::Value>, int argc, v8::Local<v8::Value> argv[]); | |
| 107 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*); | |
| 108 | |
| 109 // Returns true if the current world is isolated, and has its own Content | 106 // Returns true if the current world is isolated, and has its own Content |
| 110 // Security Policy. In this case, the policy of the main world should be | 107 // Security Policy. In this case, the policy of the main world should be |
| 111 // ignored when evaluating resources injected into the DOM. | 108 // ignored when evaluating resources injected into the DOM. |
| 112 bool shouldBypassMainWorldCSP(); | 109 bool shouldBypassMainWorldCSP(); |
| 113 | 110 |
| 114 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); | 111 PassRefPtr<SharedPersistent<v8::Object>> createPluginWrapper(Widget*); |
| 115 | 112 |
| 116 void enableEval(); | 113 void enableEval(); |
| 117 void disableEval(const String& errorMessage); | 114 void disableEval(const String& errorMessage); |
| 118 | 115 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 LocalFrame* frame() const { return toLocalFrame(m_windowProxyManager->frame(
)); } | 147 LocalFrame* frame() const { return toLocalFrame(m_windowProxyManager->frame(
)); } |
| 151 | 148 |
| 152 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, Acce
ssControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0); | 149 v8::Local<v8::Value> evaluateScriptInMainWorld(const ScriptSourceCode&, Acce
ssControlStatus, ExecuteScriptPolicy, double* compilationFinishTime = 0); |
| 153 | 150 |
| 154 Member<WindowProxyManager> m_windowProxyManager; | 151 Member<WindowProxyManager> m_windowProxyManager; |
| 155 }; | 152 }; |
| 156 | 153 |
| 157 } // namespace blink | 154 } // namespace blink |
| 158 | 155 |
| 159 #endif // ScriptController_h | 156 #endif // ScriptController_h |
| OLD | NEW |