OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/loader/ProgressTracker.h" | 57 #include "core/loader/ProgressTracker.h" |
58 #include "core/loader/appcache/ApplicationCacheHost.h" | 58 #include "core/loader/appcache/ApplicationCacheHost.h" |
59 #include "core/page/Page.h" | 59 #include "core/page/Page.h" |
60 #include "core/svg/graphics/SVGImageChromeClient.h" | 60 #include "core/svg/graphics/SVGImageChromeClient.h" |
61 #include "core/timing/DOMWindowPerformance.h" | 61 #include "core/timing/DOMWindowPerformance.h" |
62 #include "core/timing/Performance.h" | 62 #include "core/timing/Performance.h" |
63 #include "platform/Logging.h" | 63 #include "platform/Logging.h" |
64 #include "platform/network/ResourceTimingInfo.h" | 64 #include "platform/network/ResourceTimingInfo.h" |
65 #include "platform/weborigin/SchemeRegistry.h" | 65 #include "platform/weborigin/SchemeRegistry.h" |
66 #include "platform/weborigin/SecurityPolicy.h" | 66 #include "platform/weborigin/SecurityPolicy.h" |
| 67 #include "public/platform/WebFrameScheduler.h" |
67 | 68 |
68 #include <algorithm> | 69 #include <algorithm> |
69 | 70 |
70 namespace blink { | 71 namespace blink { |
71 | 72 |
72 FrameFetchContext::FrameFetchContext(DocumentLoader* loader) | 73 FrameFetchContext::FrameFetchContext(DocumentLoader* loader) |
73 : m_document(nullptr) | 74 : m_document(nullptr) |
74 , m_documentLoader(loader) | 75 , m_documentLoader(loader) |
75 , m_imageFetched(false) | 76 , m_imageFetched(false) |
76 { | 77 { |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 // Parser-blocking scripts. | 729 // Parser-blocking scripts. |
729 if (frame()->settings()->fetchIncreasePriorities() && !request.forPreloa
d()) | 730 if (frame()->settings()->fetchIncreasePriorities() && !request.forPreloa
d()) |
730 modifiedPriority++; | 731 modifiedPriority++; |
731 } | 732 } |
732 | 733 |
733 // Clamp priority | 734 // Clamp priority |
734 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); | 735 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); |
735 return static_cast<ResourceLoadPriority>(modifiedPriority); | 736 return static_cast<ResourceLoadPriority>(modifiedPriority); |
736 } | 737 } |
737 | 738 |
| 739 WebTaskRunner* FrameFetchContext::loadingTaskRunner() const |
| 740 { |
| 741 return frame()->frameScheduler()->loadingTaskRunner(); |
| 742 } |
| 743 |
738 DEFINE_TRACE(FrameFetchContext) | 744 DEFINE_TRACE(FrameFetchContext) |
739 { | 745 { |
740 visitor->trace(m_document); | 746 visitor->trace(m_document); |
741 visitor->trace(m_documentLoader); | 747 visitor->trace(m_documentLoader); |
742 FetchContext::trace(visitor); | 748 FetchContext::trace(visitor); |
743 } | 749 } |
744 | 750 |
745 } // namespace blink | 751 } // namespace blink |
OLD | NEW |