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

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

Issue 660863002: [DevTools] Added public method for async execution of scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: platform/WebExecuteScriptCallback -> web/WebScriptCallback Created 6 years, 2 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 * 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 namespace blink { 57 namespace blink {
58 58
59 class Frame; 59 class Frame;
60 class OpenedFrameTracker; 60 class OpenedFrameTracker;
61 class Visitor; 61 class Visitor;
62 class WebData; 62 class WebData;
63 class WebDataSource; 63 class WebDataSource;
64 class WebDocument; 64 class WebDocument;
65 class WebElement; 65 class WebElement;
66 class WebScriptCallback;
66 class WebFormElement; 67 class WebFormElement;
67 class WebFrameClient; 68 class WebFrameClient;
68 class WebInputElement; 69 class WebInputElement;
69 class WebLayer; 70 class WebLayer;
70 class WebLocalFrame; 71 class WebLocalFrame;
71 class WebPerformance; 72 class WebPerformance;
72 class WebPermissionClient; 73 class WebPermissionClient;
73 class WebRange; 74 class WebRange;
74 class WebRemoteFrame; 75 class WebRemoteFrame;
75 class WebSecurityOrigin; 76 class WebSecurityOrigin;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 virtual void collectGarbage() = 0; 295 virtual void collectGarbage() = 0;
295 296
296 // Check if the scripting URL represents a mixed content condition relative 297 // Check if the scripting URL represents a mixed content condition relative
297 // to this frame. 298 // to this frame.
298 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0; 299 virtual bool checkIfRunInsecureContent(const WebURL&) const = 0;
299 300
300 // Executes script in the context of the current page and returns the value 301 // Executes script in the context of the current page and returns the value
301 // that the script evaluated to. 302 // that the script evaluated to.
302 virtual v8::Handle<v8::Value> executeScriptAndReturnValue( 303 virtual v8::Handle<v8::Value> executeScriptAndReturnValue(
303 const WebScriptSource&) = 0; 304 const WebScriptSource&) = 0;
305 virtual void executeScriptAndReturnValue(
306 const WebScriptSource&, WebScriptCallback*) = 0;
dcheng 2014/10/20 07:13:54 Please address my comments from the first patchset
304 307
305 // worldID must be > 0 (as 0 represents the main world). 308 // worldID must be > 0 (as 0 represents the main world).
306 // worldID must be < EmbedderWorldIdLimit, high number used internally. 309 // worldID must be < EmbedderWorldIdLimit, high number used internally.
307 virtual void executeScriptInIsolatedWorld( 310 virtual void executeScriptInIsolatedWorld(
308 int worldID, const WebScriptSource* sourcesIn, unsigned numSources, 311 int worldID, const WebScriptSource* sourcesIn, unsigned numSources,
309 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0; 312 int extensionGroup, WebVector<v8::Local<v8::Value> >* results) = 0;
313 virtual void executeScriptInIsolatedWorld(
314 int worldID, const WebScriptSource* sourcesIn, unsigned numSources,
315 int extensionGroup, WebScriptCallback*) = 0;
310 316
311 // Call the function with the given receiver and arguments, bypassing 317 // Call the function with the given receiver and arguments, bypassing
312 // canExecute(). 318 // canExecute().
313 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled( 319 virtual v8::Handle<v8::Value> callFunctionEvenIfScriptDisabled(
314 v8::Handle<v8::Function>, 320 v8::Handle<v8::Function>,
315 v8::Handle<v8::Value>, 321 v8::Handle<v8::Value>,
316 int argc, 322 int argc,
317 v8::Handle<v8::Value> argv[]) = 0; 323 v8::Handle<v8::Value> argv[]) = 0;
318 324
319 // Returns the V8 context for associated with the main world and this 325 // Returns the V8 context for associated with the main world and this
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker; 693 WebPrivateOwnPtr<OpenedFrameTracker> m_openedFrameTracker;
688 }; 694 };
689 695
690 #if BLINK_IMPLEMENTATION 696 #if BLINK_IMPLEMENTATION
691 Frame* toCoreFrame(const WebFrame*); 697 Frame* toCoreFrame(const WebFrame*);
692 #endif 698 #endif
693 699
694 } // namespace blink 700 } // namespace blink
695 701
696 #endif 702 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698