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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2339683006: [Blink] Modify SuspendableScriptExecutor to take a v8::Function (Closed)
Patch Set: Win compile fix Created 4 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue( 767 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(
768 const WebScriptSource& source, 768 const WebScriptSource& source,
769 bool userGesture, 769 bool userGesture,
770 WebScriptExecutionCallback* callback) { 770 WebScriptExecutionCallback* callback) {
771 DCHECK(frame()); 771 DCHECK(frame());
772 772
773 SuspendableScriptExecutor::createAndRun( 773 SuspendableScriptExecutor::createAndRun(
774 frame(), 0, createSourcesVector(&source, 1), 0, userGesture, callback); 774 frame(), 0, createSourcesVector(&source, 1), 0, userGesture, callback);
775 } 775 }
776 776
777 void WebLocalFrameImpl::requestExecuteV8Function(
778 v8::Local<v8::Function> function,
779 v8::Local<v8::Value> receiver,
780 int argc,
781 v8::Local<v8::Value> argv[],
782 WebScriptExecutionCallback* callback) {
783 DCHECK(frame());
784 SuspendableScriptExecutor::createAndRun(frame(), toIsolate(frame()), function,
785 receiver, argc, argv, callback);
786 }
787
777 void WebLocalFrameImpl::executeScriptInIsolatedWorld( 788 void WebLocalFrameImpl::executeScriptInIsolatedWorld(
778 int worldID, 789 int worldID,
779 const WebScriptSource* sourcesIn, 790 const WebScriptSource* sourcesIn,
780 unsigned numSources, 791 unsigned numSources,
781 int extensionGroup, 792 int extensionGroup,
782 WebVector<v8::Local<v8::Value>>* results) { 793 WebVector<v8::Local<v8::Value>>* results) {
783 DCHECK(frame()); 794 DCHECK(frame());
784 CHECK_GT(worldID, 0); 795 CHECK_GT(worldID, 0);
785 CHECK_LT(worldID, EmbedderWorldIdLimit); 796 CHECK_LT(worldID, EmbedderWorldIdLimit);
786 797
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
2328 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2339 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2329 } else if (metric == "wasAlternateProtocolAvailable") { 2340 } else if (metric == "wasAlternateProtocolAvailable") {
2330 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2341 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2331 } else if (metric == "connectionInfo") { 2342 } else if (metric == "connectionInfo") {
2332 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2343 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2333 } 2344 }
2334 UseCounter::count(frame(), feature); 2345 UseCounter::count(frame(), feature);
2335 } 2346 }
2336 2347
2337 } // namespace blink 2348 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.h ('k') | third_party/WebKit/public/web/WebLocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698