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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 // Parser-blocking scripts. | 726 // Parser-blocking scripts. |
726 if (fetchIncreasePriorities() && !request.forPreload()) | 727 if (fetchIncreasePriorities() && !request.forPreload()) |
727 modifiedPriority++; | 728 modifiedPriority++; |
728 } | 729 } |
729 | 730 |
730 // Clamp priority | 731 // Clamp priority |
731 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); | 732 modifiedPriority = std::min(static_cast<int>(ResourceLoadPriorityHighest), s
td::max(static_cast<int>(ResourceLoadPriorityLowest), modifiedPriority)); |
732 return static_cast<ResourceLoadPriority>(modifiedPriority); | 733 return static_cast<ResourceLoadPriority>(modifiedPriority); |
733 } | 734 } |
734 | 735 |
| 736 WebTaskRunner* FrameFetchContext::loadingTaskRunner() const |
| 737 { |
| 738 return frame()->frameScheduler()->loadingTaskRunner(); |
| 739 } |
| 740 |
735 DEFINE_TRACE(FrameFetchContext) | 741 DEFINE_TRACE(FrameFetchContext) |
736 { | 742 { |
737 visitor->trace(m_document); | 743 visitor->trace(m_document); |
738 visitor->trace(m_documentLoader); | 744 visitor->trace(m_documentLoader); |
739 FetchContext::trace(visitor); | 745 FetchContext::trace(visitor); |
740 } | 746 } |
741 | 747 |
742 } // namespace blink | 748 } // namespace blink |
OLD | NEW |