OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_COMMON_NAVIGATION_PARAMS_H_ | 5 #ifndef CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 6 #define CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
51 FrameMsg_Navigate_Type::Value navigation_type, | 51 FrameMsg_Navigate_Type::Value navigation_type, |
52 bool allow_download, | 52 bool allow_download, |
53 bool should_replace_current_entry, | 53 bool should_replace_current_entry, |
54 base::TimeTicks ui_timestamp, | 54 base::TimeTicks ui_timestamp, |
55 FrameMsg_UILoadMetricsReportType::Value report_type, | 55 FrameMsg_UILoadMetricsReportType::Value report_type, |
56 const GURL& base_url_for_data_url, | 56 const GURL& base_url_for_data_url, |
57 const GURL& history_url_for_data_url, | 57 const GURL& history_url_for_data_url, |
58 PreviewsState previews_state, | 58 PreviewsState previews_state, |
59 const base::TimeTicks& navigation_start, | 59 const base::TimeTicks& navigation_start, |
60 std::string method, | 60 std::string method, |
61 const scoped_refptr<ResourceRequestBodyImpl>& post_data); | 61 const scoped_refptr<ResourceRequestBodyImpl>& post_data, |
62 bool should_bypass_main_world_CSP); | |
alexmos
2017/02/10 22:59:53
for style consistency, I'd favor lowercasing the C
arthursonzogni
2017/02/13 16:33:20
Done.
| |
62 CommonNavigationParams(const CommonNavigationParams& other); | 63 CommonNavigationParams(const CommonNavigationParams& other); |
63 ~CommonNavigationParams(); | 64 ~CommonNavigationParams(); |
64 | 65 |
65 // The URL to navigate to. | 66 // The URL to navigate to. |
66 // PlzNavigate: May be modified when the navigation is ready to commit. | 67 // PlzNavigate: May be modified when the navigation is ready to commit. |
67 GURL url; | 68 GURL url; |
68 | 69 |
69 // The URL to send in the "Referer" header field. Can be empty if there is | 70 // The URL to send in the "Referer" header field. Can be empty if there is |
70 // no referrer. | 71 // no referrer. |
71 Referrer referrer; | 72 Referrer referrer; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
112 // navigation_start value in Blink. | 113 // navigation_start value in Blink. |
113 // PlzNavigate: For renderer initiated navigations, this will be set on the | 114 // PlzNavigate: For renderer initiated navigations, this will be set on the |
114 // renderer side and sent with FrameHostMsg_BeginNavigation. | 115 // renderer side and sent with FrameHostMsg_BeginNavigation. |
115 base::TimeTicks navigation_start; | 116 base::TimeTicks navigation_start; |
116 | 117 |
117 // The request method: GET, POST, etc. | 118 // The request method: GET, POST, etc. |
118 std::string method; | 119 std::string method; |
119 | 120 |
120 // Body of HTTP POST request. | 121 // Body of HTTP POST request. |
121 scoped_refptr<ResourceRequestBodyImpl> post_data; | 122 scoped_refptr<ResourceRequestBodyImpl> post_data; |
123 | |
124 // Whether or not this navigation, including each redirections, should be | |
125 // checked against the Content-Security-Policy(CSP) of the frames that | |
126 // surround it. It is actually used to bypass the 'frame-src' and 'child-src' | |
alexmos
2017/02/10 22:59:53
nit: drop "actually"
alexmos
2017/02/10 22:59:53
"frames that surround it" is a big vague. Should
arthursonzogni
2017/02/13 16:33:20
Done. I misunderstood what "main_world" means, it
alexmos
2017/02/14 06:57:20
Interesting, thanks. It's sad that an evil render
| |
127 // CSPs when the resource that triggers this navigation lives in an isolated | |
128 // world. | |
129 bool should_bypass_main_world_CSP; | |
alexmos
2017/02/10 22:59:53
Do we have tests that things work properly when th
arthursonzogni
2017/02/13 16:33:20
Yes, I did this to make this test work:
http/tests
alexmos
2017/02/14 06:57:20
Acknowledged.
| |
122 }; | 130 }; |
123 | 131 |
124 // Provided by the renderer ---------------------------------------------------- | 132 // Provided by the renderer ---------------------------------------------------- |
125 // | 133 // |
126 // This struct holds parameters sent by the renderer to the browser. It is only | 134 // This struct holds parameters sent by the renderer to the browser. It is only |
127 // used in PlzNavigate (since in the current architecture, the renderer does not | 135 // used in PlzNavigate (since in the current architecture, the renderer does not |
128 // inform the browser of navigations until they commit). | 136 // inform the browser of navigations until they commit). |
129 | 137 |
130 // This struct is not used outside of the PlzNavigate project. | 138 // This struct is not used outside of the PlzNavigate project. |
131 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 139 // PlzNavigate: parameters needed to start a navigation on the IO thread, |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
353 ~NavigationParams(); | 361 ~NavigationParams(); |
354 | 362 |
355 CommonNavigationParams common_params; | 363 CommonNavigationParams common_params; |
356 StartNavigationParams start_params; | 364 StartNavigationParams start_params; |
357 RequestNavigationParams request_params; | 365 RequestNavigationParams request_params; |
358 }; | 366 }; |
359 | 367 |
360 } // namespace content | 368 } // namespace content |
361 | 369 |
362 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 370 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |