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 #include "bindings/core/v8/ScriptStreamer.h" | 5 #include "bindings/core/v8/ScriptStreamer.h" |
6 | 6 |
7 #include "bindings/core/v8/ScriptStreamerThread.h" | 7 #include "bindings/core/v8/ScriptStreamerThread.h" |
8 #include "bindings/core/v8/V8ScriptRunner.h" | 8 #include "bindings/core/v8/V8ScriptRunner.h" |
9 #include "core/dom/Document.h" | 9 #include "core/dom/Document.h" |
10 #include "core/dom/Element.h" | 10 #include "core/dom/Element.h" |
11 #include "core/dom/PendingScript.h" | 11 #include "core/dom/PendingScript.h" |
12 #include "core/fetch/ScriptResource.h" | 12 #include "core/fetch/ScriptResource.h" |
13 #include "core/frame/Settings.h" | 13 #include "core/frame/Settings.h" |
14 #include "core/html/parser/TextResourceDecoder.h" | 14 #include "core/html/parser/TextResourceDecoder.h" |
15 #include "platform/CrossThreadFunctional.h" | |
16 #include "platform/Histogram.h" | 15 #include "platform/Histogram.h" |
17 #include "platform/SharedBuffer.h" | 16 #include "platform/SharedBuffer.h" |
18 #include "platform/TraceEvent.h" | 17 #include "platform/TraceEvent.h" |
19 #include "public/platform/WebScheduler.h" | 18 #include "public/platform/WebScheduler.h" |
20 #include "wtf/Deque.h" | 19 #include "wtf/Deque.h" |
| 20 #include "wtf/Functional.h" |
21 #include "wtf/PtrUtil.h" | 21 #include "wtf/PtrUtil.h" |
22 #include "wtf/text/TextEncodingRegistry.h" | 22 #include "wtf/text/TextEncodingRegistry.h" |
23 #include <memory> | 23 #include <memory> |
24 | 24 |
25 namespace blink { | 25 namespace blink { |
26 | 26 |
27 namespace { | 27 namespace { |
28 | 28 |
29 void recordStartedStreamingHistogram(ScriptStreamer::Type scriptType, int reason
) | 29 void recordStartedStreamingHistogram(ScriptStreamer::Type scriptType, int reason
) |
30 { | 30 { |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
674 | 674 |
675 // The Resource might go out of scope if the script is no longer | 675 // The Resource might go out of scope if the script is no longer |
676 // needed. This makes PendingScript notify the ScriptStreamer when it is | 676 // needed. This makes PendingScript notify the ScriptStreamer when it is |
677 // destroyed. | 677 // destroyed. |
678 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); | 678 script->setStreamer(ScriptStreamer::create(script, scriptType, scriptState,
compileOption, loadingTaskRunner)); |
679 | 679 |
680 return true; | 680 return true; |
681 } | 681 } |
682 | 682 |
683 } // namespace blink | 683 } // namespace blink |
OLD | NEW |