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

Side by Side Diff: third_party/WebKit/public/web/WebLocalFrame.h

Issue 2633253002: Split content script injections into multiple tasks (Closed)
Patch Set: rebase Created 3 years, 9 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 // 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 <set> 8 #include <set>
9 #include "WebCompositionUnderline.h" 9 #include "WebCompositionUnderline.h"
10 #include "WebFrame.h" 10 #include "WebFrame.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 // Requests execution of the given function, but allowing for script 243 // Requests execution of the given function, but allowing for script
244 // suspension and asynchronous execution. 244 // suspension and asynchronous execution.
245 virtual void requestExecuteV8Function(v8::Local<v8::Context>, 245 virtual void requestExecuteV8Function(v8::Local<v8::Context>,
246 v8::Local<v8::Function>, 246 v8::Local<v8::Function>,
247 v8::Local<v8::Value> receiver, 247 v8::Local<v8::Value> receiver,
248 int argc, 248 int argc,
249 v8::Local<v8::Value> argv[], 249 v8::Local<v8::Value> argv[],
250 WebScriptExecutionCallback*) = 0; 250 WebScriptExecutionCallback*) = 0;
251 251
252 enum ScriptExecutionType {
253 // Execute script synchronously if possible.
haraken 2017/03/02 03:54:33 What do you mean by "if possible"?
Kunihiko Sakamoto 2017/03/06 09:11:06 Since requestExecute* functions use SuspendableScr
254 Synchronous,
255 // Execute script asynchronously.
256 Asynchronous,
257 // Execute script asynchronously, blocking the window.onload event.
258 AsyncBlockingOnload
haraken 2017/03/02 03:54:32 AsynchronousBlockingOnload
Kunihiko Sakamoto 2017/03/06 09:11:06 Done.
259 };
260
252 // worldID must be > 0 (as 0 represents the main world). 261 // worldID must be > 0 (as 0 represents the main world).
253 // worldID must be < EmbedderWorldIdLimit, high number used internally. 262 // worldID must be < EmbedderWorldIdLimit, high number used internally.
254 virtual void requestExecuteScriptInIsolatedWorld( 263 virtual void requestExecuteScriptInIsolatedWorld(
255 int worldID, 264 int worldID,
256 const WebScriptSource* sourceIn, 265 const WebScriptSource* sourceIn,
257 unsigned numSources, 266 unsigned numSources,
258 bool userGesture, 267 bool userGesture,
268 ScriptExecutionType,
259 WebScriptExecutionCallback*) = 0; 269 WebScriptExecutionCallback*) = 0;
260 270
261 // Associates an isolated world with human-readable name which is useful for 271 // Associates an isolated world with human-readable name which is useful for
262 // extension debugging. 272 // extension debugging.
263 virtual void setIsolatedWorldHumanReadableName(int worldID, 273 virtual void setIsolatedWorldHumanReadableName(int worldID,
264 const WebString&) = 0; 274 const WebString&) = 0;
265 275
266 // Logs to the console associated with this frame. 276 // Logs to the console associated with this frame.
267 virtual void addMessageToConsole(const WebConsoleMessage&) = 0; 277 virtual void addMessageToConsole(const WebConsoleMessage&) = 0;
268 278
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 // to call these on a WebLocalFrame. 519 // to call these on a WebLocalFrame.
510 bool isWebLocalFrame() const override = 0; 520 bool isWebLocalFrame() const override = 0;
511 WebLocalFrame* toWebLocalFrame() override = 0; 521 WebLocalFrame* toWebLocalFrame() override = 0;
512 bool isWebRemoteFrame() const override = 0; 522 bool isWebRemoteFrame() const override = 0;
513 WebRemoteFrame* toWebRemoteFrame() override = 0; 523 WebRemoteFrame* toWebRemoteFrame() override = 0;
514 }; 524 };
515 525
516 } // namespace blink 526 } // namespace blink
517 527
518 #endif // WebLocalFrame_h 528 #endif // WebLocalFrame_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698