summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h')
-rw-r--r--chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h32
1 files changed, 19 insertions, 13 deletions
diff --git a/chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h b/chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h
index f1bffa6f477..f860d358074 100644
--- a/chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h
+++ b/chromium/third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h
@@ -8,9 +8,11 @@
#include "third_party/blink/public/mojom/service_worker/controller_service_worker_mode.mojom-blink.h"
#include "third_party/blink/public/platform/web_url_loader.h"
#include "third_party/blink/renderer/platform/heap/handle.h"
+#include "third_party/blink/renderer/platform/loader/fetch/loader_freeze_mode.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_status.h"
#include "third_party/blink/renderer/platform/weborigin/kurl.h"
+#include "third_party/blink/renderer/platform/weborigin/security_origin.h"
namespace blink {
@@ -65,19 +67,14 @@ class PLATFORM_EXPORT ResourceFetcherProperties
// https://html.spec.whatwg.org/C/webappapis.html#pause
virtual bool IsPaused() const = 0;
- // Returns the deferred status of the loading in the global context.
- virtual WebURLLoader::DeferType DeferType() const = 0;
+ // Returns the freezing mode set to this context.
+ virtual LoaderFreezeMode FreezeMode() const = 0;
// Returns whether this global context is detached. Note that in some cases
// the loading pipeline continues working after detached (e.g., for fetch()
// operations with "keepalive" specified).
virtual bool IsDetached() const = 0;
- // Returns whether the loading is deferred. When true, loading tasks keep
- // running but the data is queued in the loading pipeline on the renderer.
- // Upon resume the data is given to client modules such as scripts.
- virtual bool IsLoadDeferred() const = 0;
-
// Returns whether the main resource for this global context is loaded.
virtual bool IsLoadComplete() const = 0;
@@ -98,6 +95,11 @@ class PLATFORM_EXPORT ResourceFetcherProperties
virtual const KURL& WebBundlePhysicalUrl() const = 0;
virtual int GetOutstandingThrottledLimit() const = 0;
+
+ // Returns the LitePage origin the subresources such as images should be
+ // redirected to when the kSubresourceRedirect feature is enabled.
+ virtual scoped_refptr<SecurityOrigin> GetLitePageSubresourceRedirectOrigin()
+ const = 0;
};
// A delegating ResourceFetcherProperties subclass which can be retained
@@ -137,15 +139,12 @@ class PLATFORM_EXPORT DetachableResourceFetcherProperties final
bool IsPaused() const override {
return properties_ ? properties_->IsPaused() : paused_;
}
- WebURLLoader::DeferType DeferType() const override {
- return properties_ ? properties_->DeferType() : defer_type_;
+ LoaderFreezeMode FreezeMode() const override {
+ return properties_ ? properties_->FreezeMode() : freeze_mode_;
}
bool IsDetached() const override {
return properties_ ? properties_->IsDetached() : true;
}
- bool IsLoadDeferred() const override {
- return properties_ ? properties_->IsLoadDeferred() : false;
- }
bool IsLoadComplete() const override {
return properties_ ? properties_->IsLoadComplete() : load_complete_;
}
@@ -172,6 +171,12 @@ class PLATFORM_EXPORT DetachableResourceFetcherProperties final
: outstanding_throttled_limit_;
}
+ scoped_refptr<SecurityOrigin> GetLitePageSubresourceRedirectOrigin()
+ const override {
+ return properties_ ? properties_->GetLitePageSubresourceRedirectOrigin()
+ : litepage_subresource_redirect_origin_;
+ }
+
private:
// |properties_| is null if and only if detached.
Member<const ResourceFetcherProperties> properties_;
@@ -180,11 +185,12 @@ class PLATFORM_EXPORT DetachableResourceFetcherProperties final
Member<const FetchClientSettingsObject> fetch_client_settings_object_;
bool is_main_frame_ = false;
bool paused_ = false;
- WebURLLoader::DeferType defer_type_;
+ LoaderFreezeMode freeze_mode_;
bool load_complete_ = false;
bool is_subframe_deprioritization_enabled_ = false;
KURL web_bundle_physical_url_;
int outstanding_throttled_limit_ = 0;
+ scoped_refptr<SecurityOrigin> litepage_subresource_redirect_origin_;
};
} // namespace blink