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