1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_CHILD_REQUEST_INFO_H_
6 #define CONTENT_CHILD_REQUEST_INFO_H_
12 #include "content/common/content_export.h"
13 #include "net/base/request_priority.h"
14 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h"
15 #include "third_party/WebKit/public/platform/WebURLRequest.h"
17 #include "webkit/common/resource_type.h"
21 // Structure used when calling BlinkPlatformImpl::CreateResourceLoader().
22 struct CONTENT_EXPORT RequestInfo
{
26 // HTTP-style method name (e.g., "GET" or "POST").
29 // Absolute URL encoded in ASCII per the rules of RFC-2396.
32 // URL of the document in the top-level window, which may be checked by the
33 // third-party cookie blocking policy.
34 GURL first_party_for_cookies
;
36 // Optional parameter, a URL with similar constraints in how it must be
37 // encoded as the url member.
40 // The referrer policy that applies to the referrer.
41 blink::WebReferrerPolicy referrer_policy
;
43 // For HTTP(S) requests, the headers parameter can be a \r\n-delimited and
44 // \r\n-terminated list of MIME headers. They should be ASCII-encoded using
45 // the standard MIME header encoding rules. The headers parameter can also
46 // be null if no extra request headers need to be set.
49 // Composed of the values defined in url_request_load_flags.h.
52 // Process id of the process making the request.
55 // Indicates if the current request is the main frame load, a sub-frame
56 // load, or a sub objects load.
57 ResourceType::Type request_type
;
59 // Indicates the priority of this request, as determined by WebKit.
60 net::RequestPriority priority
;
62 // Used for plugin to browser requests.
63 uint32_t request_context
;
65 // Identifies what appcache host this request is associated with.
68 // Used to associated the bridge with a frame's network context.
71 // If true, then the response body will be downloaded to a file and the
72 // path to that file will be provided in ResponseInfo::download_file_path.
73 bool download_to_file
;
75 // True if the request was user initiated.
76 bool has_user_gesture
;
78 // Extra data associated with this request. We do not own this pointer.
79 blink::WebURLRequest::ExtraData
* extra_data
;
82 DISALLOW_COPY_AND_ASSIGN(RequestInfo
);
85 } // namespace content
87 #endif // CONTENT_CHILD_REQUEST_INFO_H_