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 <memory> | 7 #include <memory> |
8 #include "bindings/core/v8/ScriptStreamerThread.h" | 8 #include "bindings/core/v8/ScriptStreamerThread.h" |
9 #include "bindings/core/v8/V8ScriptRunner.h" | 9 #include "bindings/core/v8/V8ScriptRunner.h" |
10 #include "core/dom/ClassicPendingScript.h" | 10 #include "core/dom/ClassicPendingScript.h" |
11 #include "core/dom/Document.h" | 11 #include "core/dom/Document.h" |
12 #include "core/dom/Element.h" | 12 #include "core/dom/Element.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 "core/loader/resource/ScriptResource.h" | 15 #include "core/loader/resource/ScriptResource.h" |
16 #include "platform/CrossThreadFunctional.h" | 16 #include "platform/CrossThreadFunctional.h" |
17 #include "platform/Histogram.h" | 17 #include "platform/Histogram.h" |
18 #include "platform/SharedBuffer.h" | 18 #include "platform/SharedBuffer.h" |
19 #include "platform/instrumentation/tracing/TraceEvent.h" | 19 #include "platform/instrumentation/tracing/TraceEvent.h" |
20 #include "platform/loader/fetch/CachedMetadata.h" | 20 #include "platform/loader/fetch/CachedMetadata.h" |
| 21 #include "platform/scheduler/child/web_scheduler.h" |
21 #include "platform/wtf/Deque.h" | 22 #include "platform/wtf/Deque.h" |
22 #include "platform/wtf/PtrUtil.h" | 23 #include "platform/wtf/PtrUtil.h" |
23 #include "platform/wtf/text/TextEncodingRegistry.h" | 24 #include "platform/wtf/text/TextEncodingRegistry.h" |
24 #include "public/platform/WebScheduler.h" | |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 | 27 |
28 namespace { | 28 namespace { |
29 | 29 |
30 void RecordStartedStreamingHistogram(ScriptStreamer::Type script_type, | 30 void RecordStartedStreamingHistogram(ScriptStreamer::Type script_type, |
31 int reason) { | 31 int reason) { |
32 switch (script_type) { | 32 switch (script_type) { |
33 case ScriptStreamer::kParsingBlocking: { | 33 case ScriptStreamer::kParsingBlocking: { |
34 DEFINE_STATIC_LOCAL( | 34 DEFINE_STATIC_LOCAL( |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 // This makes ClassicPendingScript notify the ScriptStreamer when it is | 619 // This makes ClassicPendingScript notify the ScriptStreamer when it is |
620 // destroyed. | 620 // destroyed. |
621 script->SetStreamer(ScriptStreamer::Create(script, script_type, script_state, | 621 script->SetStreamer(ScriptStreamer::Create(script, script_type, script_state, |
622 compile_option, | 622 compile_option, |
623 std::move(loading_task_runner))); | 623 std::move(loading_task_runner))); |
624 | 624 |
625 return true; | 625 return true; |
626 } | 626 } |
627 | 627 |
628 } // namespace blink | 628 } // namespace blink |
OLD | NEW |