| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebLocalFrame_h | 5 #ifndef WebLocalFrame_h |
| 6 #define WebLocalFrame_h | 6 #define WebLocalFrame_h |
| 7 | 7 |
| 8 #include "WebCompositionUnderline.h" | 8 #include "WebCompositionUnderline.h" |
| 9 #include "WebFrame.h" | 9 #include "WebFrame.h" |
| 10 #include "WebFrameLoadType.h" | 10 #include "WebFrameLoadType.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 // Requests execution of the given function, but allowing for script | 226 // Requests execution of the given function, but allowing for script |
| 227 // suspension and asynchronous execution. | 227 // suspension and asynchronous execution. |
| 228 virtual void requestExecuteV8Function(v8::Local<v8::Context>, | 228 virtual void requestExecuteV8Function(v8::Local<v8::Context>, |
| 229 v8::Local<v8::Function>, | 229 v8::Local<v8::Function>, |
| 230 v8::Local<v8::Value> receiver, | 230 v8::Local<v8::Value> receiver, |
| 231 int argc, | 231 int argc, |
| 232 v8::Local<v8::Value> argv[], | 232 v8::Local<v8::Value> argv[], |
| 233 WebScriptExecutionCallback*) = 0; | 233 WebScriptExecutionCallback*) = 0; |
| 234 | 234 |
| 235 enum ScriptExecutionType { |
| 236 // Execute script synchronously if possible. |
| 237 Synchronous, |
| 238 // Execute script asynchronously. |
| 239 Asynchronous, |
| 240 // Execute script asynchronously, blocking the window.onload event. |
| 241 AsyncBlockingOnload |
| 242 }; |
| 243 |
| 235 // worldID must be > 0 (as 0 represents the main world). | 244 // worldID must be > 0 (as 0 represents the main world). |
| 236 // worldID must be < EmbedderWorldIdLimit, high number used internally. | 245 // worldID must be < EmbedderWorldIdLimit, high number used internally. |
| 237 virtual void requestExecuteScriptInIsolatedWorld( | 246 virtual void requestExecuteScriptInIsolatedWorld( |
| 238 int worldID, | 247 int worldID, |
| 239 const WebScriptSource* sourceIn, | 248 const WebScriptSource* sourceIn, |
| 240 unsigned numSources, | 249 unsigned numSources, |
| 241 bool userGesture, | 250 bool userGesture, |
| 251 ScriptExecutionType, |
| 242 WebScriptExecutionCallback*) = 0; | 252 WebScriptExecutionCallback*) = 0; |
| 243 | 253 |
| 244 // Associates an isolated world with human-readable name which is useful for | 254 // Associates an isolated world with human-readable name which is useful for |
| 245 // extension debugging. | 255 // extension debugging. |
| 246 virtual void setIsolatedWorldHumanReadableName(int worldID, | 256 virtual void setIsolatedWorldHumanReadableName(int worldID, |
| 247 const WebString&) = 0; | 257 const WebString&) = 0; |
| 248 | 258 |
| 249 // Logs to the console associated with this frame. | 259 // Logs to the console associated with this frame. |
| 250 virtual void addMessageToConsole(const WebConsoleMessage&) = 0; | 260 virtual void addMessageToConsole(const WebConsoleMessage&) = 0; |
| 251 | 261 |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 // to call these on a WebLocalFrame. | 502 // to call these on a WebLocalFrame. |
| 493 bool isWebLocalFrame() const override = 0; | 503 bool isWebLocalFrame() const override = 0; |
| 494 WebLocalFrame* toWebLocalFrame() override = 0; | 504 WebLocalFrame* toWebLocalFrame() override = 0; |
| 495 bool isWebRemoteFrame() const override = 0; | 505 bool isWebRemoteFrame() const override = 0; |
| 496 WebRemoteFrame* toWebRemoteFrame() override = 0; | 506 WebRemoteFrame* toWebRemoteFrame() override = 0; |
| 497 }; | 507 }; |
| 498 | 508 |
| 499 } // namespace blink | 509 } // namespace blink |
| 500 | 510 |
| 501 #endif // WebLocalFrame_h | 511 #endif // WebLocalFrame_h |
| OLD | NEW |