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