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/browser/global_request_id.h" | 10 #include "content/public/browser/global_request_id.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request, | 42 CONTENT_EXPORT static void AllocateForTesting(net::URLRequest* request, |
43 ResourceType resource_type, | 43 ResourceType resource_type, |
44 ResourceContext* context, | 44 ResourceContext* context, |
45 int render_process_id, | 45 int render_process_id, |
46 int render_view_id, | 46 int render_view_id, |
47 int render_frame_id, | 47 int render_frame_id, |
48 bool is_main_frame, | 48 bool is_main_frame, |
49 bool parent_is_main_frame, | 49 bool parent_is_main_frame, |
50 bool allow_download, | 50 bool allow_download, |
51 bool is_async, | 51 bool is_async, |
52 bool is_using_lofi); | 52 int previews_state); |
nasko
2016/12/08 22:19:33
PreviewsState?
megjablon
2016/12/09 20:35:55
Done.
| |
53 | 53 |
54 // Returns the associated RenderFrame for a given process. Returns false, if | 54 // Returns the associated RenderFrame for a given process. Returns false, if |
55 // there is no associated RenderFrame. This method does not rely on the | 55 // there is no associated RenderFrame. This method does not rely on the |
56 // request being allocated by the ResourceDispatcherHost, but works for all | 56 // request being allocated by the ResourceDispatcherHost, but works for all |
57 // URLRequests that are associated with a RenderFrame. | 57 // URLRequests that are associated with a RenderFrame. |
58 CONTENT_EXPORT static bool GetRenderFrameForRequest( | 58 CONTENT_EXPORT static bool GetRenderFrameForRequest( |
59 const net::URLRequest* request, | 59 const net::URLRequest* request, |
60 int* render_process_id, | 60 int* render_process_id, |
61 int* render_frame_id); | 61 int* render_frame_id); |
62 | 62 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
151 // Returns false if there is NOT an associated render frame. | 151 // Returns false if there is NOT an associated render frame. |
152 virtual bool GetAssociatedRenderFrame(int* render_process_id, | 152 virtual bool GetAssociatedRenderFrame(int* render_process_id, |
153 int* render_frame_id) const = 0; | 153 int* render_frame_id) const = 0; |
154 | 154 |
155 // Returns true if this is associated with an asynchronous request. | 155 // Returns true if this is associated with an asynchronous request. |
156 virtual bool IsAsync() const = 0; | 156 virtual bool IsAsync() const = 0; |
157 | 157 |
158 // Whether this is a download. | 158 // Whether this is a download. |
159 virtual bool IsDownload() const = 0; | 159 virtual bool IsDownload() const = 0; |
160 | 160 |
161 // Whether this request if using Lo-Fi mode. | 161 // Returns the current state of Previews. |
162 virtual bool IsUsingLoFi() const = 0; | 162 virtual int GetPreviewsState() const = 0; |
163 | 163 |
164 // PlzNavigate | 164 // PlzNavigate |
165 // Only used for navigations. Returns opaque data set by the embedder on the | 165 // Only used for navigations. Returns opaque data set by the embedder on the |
166 // UI thread at the beginning of navigation. | 166 // UI thread at the beginning of navigation. |
167 virtual NavigationUIData* GetNavigationUIData() const = 0; | 167 virtual NavigationUIData* GetNavigationUIData() const = 0; |
168 | 168 |
169 protected: | 169 protected: |
170 virtual ~ResourceRequestInfo() {} | 170 virtual ~ResourceRequestInfo() {} |
171 }; | 171 }; |
172 | 172 |
173 } // namespace content | 173 } // namespace content |
174 | 174 |
175 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ | 175 #endif // CONTENT_PUBLIC_BROWSER_RESOURCE_REQUEST_INFO_H_ |
OLD | NEW |