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

Unified Diff: trunk/public/platform/WebURLRequest.h

Issue 422343003: Revert 179125 "Drop the 'WebURLRequest::TargetType' enum." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: Created 6 years, 5 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
« no previous file with comments | « trunk/Source/platform/exported/WebURLRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/public/platform/WebURLRequest.h
===================================================================
--- trunk/public/platform/WebURLRequest.h (revision 179161)
+++ trunk/public/platform/WebURLRequest.h (working copy)
@@ -67,7 +67,30 @@
PriorityVeryHigh,
};
+ enum TargetType {
+ TargetIsMainFrame = 0,
+ TargetIsSubframe = 1,
+ TargetIsSubresource = 2,
+ TargetIsStyleSheet = 3,
+ TargetIsScript = 4,
+ TargetIsFontResource = 5,
+ TargetIsImage = 6,
+ TargetIsObject = 7,
+ TargetIsMedia = 8,
+ TargetIsWorker = 9,
+ TargetIsSharedWorker = 10,
+ TargetIsPrefetch = 11,
+ TargetIsFavicon = 12,
+ TargetIsXHR = 13,
+ TargetIsTextTrack = 14,
+ TargetIsPing = 15,
+ TargetIsServiceWorker = 16,
+ TargetIsUnspecified = 17,
+ };
+
// Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-request-context
+ //
+ // FIXME: Drop the TargetType enum once embedders are updated upstream.
enum RequestContext {
RequestContextUnspecified = 0,
RequestContextInternal, // FIXME: This isn't part of Fetch. It should be.
@@ -177,6 +200,10 @@
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);
@@ -229,6 +256,10 @@
BLINK_PLATFORM_EXPORT const blink::ResourceRequest& toResourceRequest() const;
#endif
+ // FIXME: Drop these once we replace TargetType upstream.
+ static RequestContext requestContextFromTargetType(TargetType);
+ static TargetType targetTypeFromRequestContextAndFrameType(RequestContext, FrameType);
+
protected:
BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*);
« no previous file with comments | « trunk/Source/platform/exported/WebURLRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698