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/callback_forward.h" | 8 #include "base/callback_forward.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/common/resource_type.h" | 10 #include "content/public/common/resource_type.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // The IPC route identifier of the RenderFrame. | 87 // The IPC route identifier of the RenderFrame. |
88 // To get a WebContents, use GetWebContentsGetterForRequest instead. | 88 // To get a WebContents, use GetWebContentsGetterForRequest instead. |
89 // TODO(jam): once all navigation and resource requests are sent between | 89 // TODO(jam): once all navigation and resource requests are sent between |
90 // frames and RenderView/RenderViewHost aren't involved we can remove this and | 90 // frames and RenderView/RenderViewHost aren't involved we can remove this and |
91 // just use GetRouteID above. | 91 // just use GetRouteID above. |
92 virtual int GetRenderFrameID() const = 0; | 92 virtual int GetRenderFrameID() const = 0; |
93 | 93 |
94 // True if GetRenderFrameID() represents a main frame in the RenderView. | 94 // True if GetRenderFrameID() represents a main frame in the RenderView. |
95 virtual bool IsMainFrame() const = 0; | 95 virtual bool IsMainFrame() const = 0; |
96 | 96 |
97 // True if GetParentRenderFrameID() represents a main frame in the RenderView. | 97 // True if the frame's parent represents a main frame in the RenderView. |
98 virtual bool ParentIsMainFrame() const = 0; | 98 virtual bool ParentIsMainFrame() const = 0; |
99 | 99 |
100 // Routing ID of parent frame of frame that sent this resource request. | |
101 // -1 if unknown / invalid. | |
102 virtual int GetParentRenderFrameID() const = 0; | |
103 | |
104 // Returns the associated resource type. | 100 // Returns the associated resource type. |
105 virtual ResourceType GetResourceType() const = 0; | 101 virtual ResourceType GetResourceType() const = 0; |
106 | 102 |
107 // Returns the process type that initiated this request. | 103 // Returns the process type that initiated this request. |
108 virtual int GetProcessType() const = 0; | 104 virtual int GetProcessType() const = 0; |
109 | 105 |
110 // Returns the associated referrer policy. | 106 // Returns the associated referrer policy. |
111 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; | 107 virtual blink::WebReferrerPolicy GetReferrerPolicy() const = 0; |
112 | 108 |
113 // Returns the associated visibility state at the time the request was started | 109 // Returns the associated visibility state at the time the request was started |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 // Whether this request if using Lo-Fi mode. | 141 // Whether this request if using Lo-Fi mode. |
146 virtual bool IsUsingLoFi() const = 0; | 142 virtual bool IsUsingLoFi() const = 0; |
147 | 143 |
148 protected: | 144 protected: |
149 virtual ~ResourceRequestInfo() {} | 145 virtual ~ResourceRequestInfo() {} |
150 }; | 146 }; |
151 | 147 |
152 } // namespace content | 148 } // namespace content |
153 | 149 |
154 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 150 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
OLD | NEW |