| OLD | NEW |
| 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource
Code(source.code, source.url, position)); | 775 return frame()->script().executeScriptInMainWorldAndReturnValue(ScriptSource
Code(source.code, source.url, position)); |
| 776 } | 776 } |
| 777 | 777 |
| 778 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(const WebScriptSource
& source, bool userGesture, WebScriptExecutionCallback* callback) | 778 void WebLocalFrameImpl::requestExecuteScriptAndReturnValue(const WebScriptSource
& source, bool userGesture, WebScriptExecutionCallback* callback) |
| 779 { | 779 { |
| 780 DCHECK(frame()); | 780 DCHECK(frame()); |
| 781 | 781 |
| 782 SuspendableScriptExecutor::createAndRun(frame(), 0, createSourcesVector(&sou
rce, 1), 0, userGesture, callback); | 782 SuspendableScriptExecutor::createAndRun(frame(), 0, createSourcesVector(&sou
rce, 1), 0, userGesture, callback); |
| 783 } | 783 } |
| 784 | 784 |
| 785 void WebLocalFrameImpl::requestExecuteV8Function(v8::Local<v8::Function> functio
n, v8::Local<v8::Value> receiver, int argc, v8::Local<v8::Value> argv[], WebScri
ptExecutionCallback* callback) |
| 786 { |
| 787 DCHECK(frame()); |
| 788 SuspendableScriptExecutor::createAndRun(frame(), toIsolate(frame()), functio
n, receiver, argc, argv, callback); |
| 789 } |
| 790 |
| 785 void WebLocalFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScrip
tSource* sourcesIn, unsigned numSources, int extensionGroup, WebVector<v8::Local
<v8::Value>>* results) | 791 void WebLocalFrameImpl::executeScriptInIsolatedWorld(int worldID, const WebScrip
tSource* sourcesIn, unsigned numSources, int extensionGroup, WebVector<v8::Local
<v8::Value>>* results) |
| 786 { | 792 { |
| 787 DCHECK(frame()); | 793 DCHECK(frame()); |
| 788 CHECK_GT(worldID, 0); | 794 CHECK_GT(worldID, 0); |
| 789 CHECK_LT(worldID, EmbedderWorldIdLimit); | 795 CHECK_LT(worldID, EmbedderWorldIdLimit); |
| 790 | 796 |
| 791 HeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSou
rces); | 797 HeapVector<ScriptSourceCode> sources = createSourcesVector(sourcesIn, numSou
rces); |
| 792 | 798 |
| 793 if (results) { | 799 if (results) { |
| 794 Vector<v8::Local<v8::Value>> scriptResults; | 800 Vector<v8::Local<v8::Value>> scriptResults; |
| (...skipping 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2235 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2241 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
| 2236 } else if (metric == "wasAlternateProtocolAvailable") { | 2242 } else if (metric == "wasAlternateProtocolAvailable") { |
| 2237 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2243 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
| 2238 } else if (metric == "connectionInfo") { | 2244 } else if (metric == "connectionInfo") { |
| 2239 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2245 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
| 2240 } | 2246 } |
| 2241 UseCounter::count(frame(), feature); | 2247 UseCounter::count(frame(), feature); |
| 2242 } | 2248 } |
| 2243 | 2249 |
| 2244 } // namespace blink | 2250 } // namespace blink |
| OLD | NEW |