Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: public/platform/WebURLRequest.h

Issue 360233005: Replace 'ResourceRequest::TargetType' with 'ResourceRequest::RequestContext'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: public/platform/WebURLRequest.h
diff --git a/public/platform/WebURLRequest.h b/public/platform/WebURLRequest.h
index 0e65e80f99750704d611416bdc763a0dd5cb4178..0a0f95c1e3e0937a1121fa621b8c3b61872ada2b 100644
--- a/public/platform/WebURLRequest.h
+++ b/public/platform/WebURLRequest.h
@@ -88,6 +88,34 @@ public:
TargetIsUnspecified = 17,
};
+ // FIXME: Drop the TargetType enum once embedders are updated upstream.
+ enum RequestContext {
+ UnspecifiedContext = 0,
abarth-chromium 2014/07/01 14:50:54 The normal naming we use in the API would be: Req
Mike West 2014/07/01 15:00:20 Find and replace to the rescue!
+ AudioContext,
+ ConnectContext,
+ DownloadContext,
+ FaviconContext,
+ FontContext,
+ FormContext,
+ ImageContext,
+ MainFrameContext,
+ ManifestContext,
+ ObjectContext,
+ ObjectRequestContext,
+ PingContext,
+ PopupContext,
+ PrefetchContext,
+ ScriptContext,
+ ServiceWorkerContext,
+ SharedWorkerContext,
+ StyleContext,
+ SubFrameContext,
+ SubresourceContext,
+ TextTrackContext,
+ VideoContext,
+ WorkerContext
+ };
+
class ExtraData {
public:
virtual ~ExtraData() { }
@@ -154,9 +182,13 @@ public:
BLINK_PLATFORM_EXPORT bool reportRawHeaders() const;
BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool);
+ // FIXME: Remove these once content/ and net/ are updated.
BLINK_PLATFORM_EXPORT TargetType targetType() const;
BLINK_PLATFORM_EXPORT void setTargetType(TargetType);
+ BLINK_PLATFORM_EXPORT RequestContext requestContext() const;
+ BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext);
+
BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const;
// Adds an HTTP origin header if it is empty and the HTTP method of the
@@ -203,6 +235,9 @@ public:
BLINK_PLATFORM_EXPORT const WebCore::ResourceRequest& toResourceRequest() const;
#endif
+ // FIXME: Drop these once we replace TargetType upstream.
+ static RequestContext requestContextFromTargetType(TargetType);
+ static TargetType targetTypeFromRequestContext(RequestContext);
protected:
BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*);
« Source/platform/network/ResourceRequest.h ('K') | « Source/web/WebSharedWorkerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698