OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/page_transition_types.h" | 10 #include "content/public/common/page_transition_types.h" |
11 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" | 11 #include "third_party/WebKit/public/platform/WebReferrerPolicy.h" |
12 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | |
12 #include "webkit/common/resource_type.h" | 13 #include "webkit/common/resource_type.h" |
13 | 14 |
14 namespace net { | 15 namespace net { |
15 class URLRequest; | 16 class URLRequest; |
16 } | 17 } |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 class ResourceContext; | 20 class ResourceContext; |
20 | 21 |
21 // Each URLRequest allocated by the ResourceDispatcherHost has a | 22 // Each URLRequest allocated by the ResourceDispatcherHost has a |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 // Frame ID of parent frame of frame that sent this resource request. | 83 // Frame ID of parent frame of frame that sent this resource request. |
83 // -1 if unknown / invalid. | 84 // -1 if unknown / invalid. |
84 virtual int64 GetParentFrameID() const = 0; | 85 virtual int64 GetParentFrameID() const = 0; |
85 | 86 |
86 // Returns the associated resource type. | 87 // Returns the associated resource type. |
87 virtual ResourceType::Type GetResourceType() const = 0; | 88 virtual ResourceType::Type GetResourceType() const = 0; |
88 | 89 |
89 // Returns the associated referrer policy. | 90 // Returns the associated referrer policy. |
90 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; | 91 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; |
91 | 92 |
93 // Returns the associated visibility state. | |
davidben
2014/01/20 20:51:57
Nit: Maybe make the comment clear that this is the
jam
2014/01/21 00:30:08
Done.
| |
94 virtual blink::WebPageVisibilityState GetVisibilityState() const = 0; | |
95 | |
92 // Returns the associated page transition type. | 96 // Returns the associated page transition type. |
93 virtual PageTransition GetPageTransition() const = 0; | 97 virtual PageTransition GetPageTransition() const = 0; |
94 | 98 |
95 // True if the request was initiated by a user action (like a tap to follow | 99 // True if the request was initiated by a user action (like a tap to follow |
96 // a link). | 100 // a link). |
97 virtual bool HasUserGesture() const = 0; | 101 virtual bool HasUserGesture() const = 0; |
98 | 102 |
99 // True if ResourceController::CancelAndIgnore() was called. For example, | 103 // True if ResourceController::CancelAndIgnore() was called. For example, |
100 // the requested URL may be being loaded by an external program. | 104 // the requested URL may be being loaded by an external program. |
101 virtual bool WasIgnoredByHandler() const = 0; | 105 virtual bool WasIgnoredByHandler() const = 0; |
102 | 106 |
103 // Returns false if there is NOT an associated render frame. | 107 // Returns false if there is NOT an associated render frame. |
104 virtual bool GetAssociatedRenderFrame(int* render_process_id, | 108 virtual bool GetAssociatedRenderFrame(int* render_process_id, |
105 int* render_frame_id) const = 0; | 109 int* render_frame_id) const = 0; |
106 | 110 |
107 // Returns true if this is associated with an asynchronous request. | 111 // Returns true if this is associated with an asynchronous request. |
108 virtual bool IsAsync() const = 0; | 112 virtual bool IsAsync() const = 0; |
109 | 113 |
110 // Whether this is a download. | 114 // Whether this is a download. |
111 virtual bool IsDownload() const = 0; | 115 virtual bool IsDownload() const = 0; |
112 | 116 |
113 protected: | 117 protected: |
114 virtual ~ResourceRequestInfo() {} | 118 virtual ~ResourceRequestInfo() {} |
115 }; | 119 }; |
116 | 120 |
117 } // namespace content | 121 } // namespace content |
118 | 122 |
119 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 123 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
OLD | NEW |