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" | |
68 | 67 |
69 #include <algorithm> | 68 #include <algorithm> |
70 | 69 |
71 namespace blink { | 70 namespace blink { |
72 | 71 |
73 FrameFetchContext::FrameFetchContext(DocumentLoader* loader) | 72 FrameFetchContext::FrameFetchContext(DocumentLoader* loader) |
74 : m_document(nullptr) | 73 : m_document(nullptr) |
75 , m_documentLoader(loader) | 74 , m_documentLoader(loader) |
76 , m_imageFetched(false) | 75 , m_imageFetched(false) |
77 { | 76 { |
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 // Parser-blocking scripts. | 728 // Parser-blocking scripts. |
730 if (frame()->settings()->fetchIncreasePriorities() && !request.forPreloa
d()) | 729 if (frame()->settings()->fetchIncreasePriorities() && !request.forPreloa
d()) |
731 modifiedPriority++; | 730 modifiedPriority++; |
732 } | 731 } |
733 | 732 |
734 // Clamp priority | 733 // Clamp priority |
735 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); | 734 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); |
736 return static_cast<ResourceLoadPriority>(modifiedPriority); | 735 return static_cast<ResourceLoadPriority>(modifiedPriority); |
737 } | 736 } |
738 | 737 |
739 WebTaskRunner* FrameFetchContext::loadingTaskRunner() const | |
740 { | |
741 return frame()->frameScheduler()->loadingTaskRunner(); | |
742 } | |
743 | |
744 DEFINE_TRACE(FrameFetchContext) | 738 DEFINE_TRACE(FrameFetchContext) |
745 { | 739 { |
746 visitor->trace(m_document); | 740 visitor->trace(m_document); |
747 visitor->trace(m_documentLoader); | 741 visitor->trace(m_documentLoader); |
748 FetchContext::trace(visitor); | 742 FetchContext::trace(visitor); |
749 } | 743 } |
750 | 744 |
751 } // namespace blink | 745 } // namespace blink |
OLD | NEW |