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

Side by Side 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, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/Source/platform/exported/WebURLRequest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 enum Priority { 61 enum Priority {
62 PriorityUnresolved = -1, 62 PriorityUnresolved = -1,
63 PriorityVeryLow, 63 PriorityVeryLow,
64 PriorityLow, 64 PriorityLow,
65 PriorityMedium, 65 PriorityMedium,
66 PriorityHigh, 66 PriorityHigh,
67 PriorityVeryHigh, 67 PriorityVeryHigh,
68 }; 68 };
69 69
70 enum TargetType {
71 TargetIsMainFrame = 0,
72 TargetIsSubframe = 1,
73 TargetIsSubresource = 2,
74 TargetIsStyleSheet = 3,
75 TargetIsScript = 4,
76 TargetIsFontResource = 5,
77 TargetIsImage = 6,
78 TargetIsObject = 7,
79 TargetIsMedia = 8,
80 TargetIsWorker = 9,
81 TargetIsSharedWorker = 10,
82 TargetIsPrefetch = 11,
83 TargetIsFavicon = 12,
84 TargetIsXHR = 13,
85 TargetIsTextTrack = 14,
86 TargetIsPing = 15,
87 TargetIsServiceWorker = 16,
88 TargetIsUnspecified = 17,
89 };
90
70 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r equest-context 91 // Corresponds to Fetch's "context": http://fetch.spec.whatwg.org/#concept-r equest-context
92 //
93 // FIXME: Drop the TargetType enum once embedders are updated upstream.
71 enum RequestContext { 94 enum RequestContext {
72 RequestContextUnspecified = 0, 95 RequestContextUnspecified = 0,
73 RequestContextInternal, // FIXME: This isn't part of Fetch. It should be . 96 RequestContextInternal, // FIXME: This isn't part of Fetch. It should be .
74 RequestContextAudio, 97 RequestContextAudio,
75 RequestContextBeacon, 98 RequestContextBeacon,
76 RequestContextCSPReport, 99 RequestContextCSPReport,
77 RequestContextDownload, 100 RequestContextDownload,
78 RequestContextEmbed, 101 RequestContextEmbed,
79 RequestContextEventSource, 102 RequestContextEventSource,
80 RequestContextFavicon, 103 RequestContextFavicon,
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // Controls whether upload progress events are generated when a request 193 // Controls whether upload progress events are generated when a request
171 // has a body. 194 // has a body.
172 BLINK_PLATFORM_EXPORT bool reportUploadProgress() const; 195 BLINK_PLATFORM_EXPORT bool reportUploadProgress() const;
173 BLINK_PLATFORM_EXPORT void setReportUploadProgress(bool); 196 BLINK_PLATFORM_EXPORT void setReportUploadProgress(bool);
174 197
175 // Controls whether actual headers sent and received for request are 198 // Controls whether actual headers sent and received for request are
176 // collected and reported. 199 // collected and reported.
177 BLINK_PLATFORM_EXPORT bool reportRawHeaders() const; 200 BLINK_PLATFORM_EXPORT bool reportRawHeaders() const;
178 BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool); 201 BLINK_PLATFORM_EXPORT void setReportRawHeaders(bool);
179 202
203 // FIXME: Remove these once content/ and net/ are updated.
204 BLINK_PLATFORM_EXPORT TargetType targetType() const;
205 BLINK_PLATFORM_EXPORT void setTargetType(TargetType);
206
180 BLINK_PLATFORM_EXPORT RequestContext requestContext() const; 207 BLINK_PLATFORM_EXPORT RequestContext requestContext() const;
181 BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext); 208 BLINK_PLATFORM_EXPORT void setRequestContext(RequestContext);
182 209
183 BLINK_PLATFORM_EXPORT FrameType frameType() const; 210 BLINK_PLATFORM_EXPORT FrameType frameType() const;
184 BLINK_PLATFORM_EXPORT void setFrameType(FrameType); 211 BLINK_PLATFORM_EXPORT void setFrameType(FrameType);
185 212
186 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const; 213 BLINK_PLATFORM_EXPORT WebReferrerPolicy referrerPolicy() const;
187 214
188 // Adds an HTTP origin header if it is empty and the HTTP method of the 215 // Adds an HTTP origin header if it is empty and the HTTP method of the
189 // request requires it. 216 // request requires it.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*); 249 BLINK_PLATFORM_EXPORT void setExtraData(ExtraData*);
223 250
224 BLINK_PLATFORM_EXPORT Priority priority() const; 251 BLINK_PLATFORM_EXPORT Priority priority() const;
225 BLINK_PLATFORM_EXPORT void setPriority(Priority); 252 BLINK_PLATFORM_EXPORT void setPriority(Priority);
226 253
227 #if INSIDE_BLINK 254 #if INSIDE_BLINK
228 BLINK_PLATFORM_EXPORT blink::ResourceRequest& toMutableResourceRequest(); 255 BLINK_PLATFORM_EXPORT blink::ResourceRequest& toMutableResourceRequest();
229 BLINK_PLATFORM_EXPORT const blink::ResourceRequest& toResourceRequest() cons t; 256 BLINK_PLATFORM_EXPORT const blink::ResourceRequest& toResourceRequest() cons t;
230 #endif 257 #endif
231 258
259 // FIXME: Drop these once we replace TargetType upstream.
260 static RequestContext requestContextFromTargetType(TargetType);
261 static TargetType targetTypeFromRequestContextAndFrameType(RequestContext, F rameType);
262
232 protected: 263 protected:
233 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*); 264 BLINK_PLATFORM_EXPORT void assign(WebURLRequestPrivate*);
234 265
235 private: 266 private:
236 WebURLRequestPrivate* m_private; 267 WebURLRequestPrivate* m_private;
237 }; 268 };
238 269
239 } // namespace blink 270 } // namespace blink
240 271
241 #endif 272 #endif
OLDNEW
« 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