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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 FrameMsg_Navigate_Type::Value navigation_type, | 52 FrameMsg_Navigate_Type::Value navigation_type, |
53 bool allow_download, | 53 bool allow_download, |
54 bool should_replace_current_entry, | 54 bool should_replace_current_entry, |
55 base::TimeTicks ui_timestamp, | 55 base::TimeTicks ui_timestamp, |
56 FrameMsg_UILoadMetricsReportType::Value report_type, | 56 FrameMsg_UILoadMetricsReportType::Value report_type, |
57 const GURL& base_url_for_data_url, | 57 const GURL& base_url_for_data_url, |
58 const GURL& history_url_for_data_url, | 58 const GURL& history_url_for_data_url, |
59 PreviewsState previews_state, | 59 PreviewsState previews_state, |
60 const base::TimeTicks& navigation_start, | 60 const base::TimeTicks& navigation_start, |
61 std::string method, | 61 std::string method, |
62 const scoped_refptr<ResourceRequestBodyImpl>& post_data); | 62 const scoped_refptr<ResourceRequestBodyImpl>& post_data, |
| 63 bool should_bypass_main_world_csp); |
63 CommonNavigationParams(const CommonNavigationParams& other); | 64 CommonNavigationParams(const CommonNavigationParams& other); |
64 ~CommonNavigationParams(); | 65 ~CommonNavigationParams(); |
65 | 66 |
66 // The URL to navigate to. | 67 // The URL to navigate to. |
67 // PlzNavigate: May be modified when the navigation is ready to commit. | 68 // PlzNavigate: May be modified when the navigation is ready to commit. |
68 GURL url; | 69 GURL url; |
69 | 70 |
70 // The URL to send in the "Referer" header field. Can be empty if there is | 71 // The URL to send in the "Referer" header field. Can be empty if there is |
71 // no referrer. | 72 // no referrer. |
72 Referrer referrer; | 73 Referrer referrer; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 // navigation_start value in Blink. | 114 // navigation_start value in Blink. |
114 // PlzNavigate: For renderer initiated navigations, this will be set on the | 115 // PlzNavigate: For renderer initiated navigations, this will be set on the |
115 // renderer side and sent with FrameHostMsg_BeginNavigation. | 116 // renderer side and sent with FrameHostMsg_BeginNavigation. |
116 base::TimeTicks navigation_start; | 117 base::TimeTicks navigation_start; |
117 | 118 |
118 // The request method: GET, POST, etc. | 119 // The request method: GET, POST, etc. |
119 std::string method; | 120 std::string method; |
120 | 121 |
121 // Body of HTTP POST request. | 122 // Body of HTTP POST request. |
122 scoped_refptr<ResourceRequestBodyImpl> post_data; | 123 scoped_refptr<ResourceRequestBodyImpl> post_data; |
| 124 |
| 125 // Returns true if the navigation was initiated from an isolated world. An |
| 126 // isolated world has its own Content Security Policy. In this case, the |
| 127 // policy of the main world should be ignored when evaluating resources |
| 128 // injected into the DOM. |
| 129 bool should_bypass_main_world_csp; |
123 }; | 130 }; |
124 | 131 |
125 // Provided by the renderer ---------------------------------------------------- | 132 // Provided by the renderer ---------------------------------------------------- |
126 // | 133 // |
127 // 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 |
128 // 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 |
129 // inform the browser of navigations until they commit). | 136 // inform the browser of navigations until they commit). |
130 | 137 |
131 // This struct is not used outside of the PlzNavigate project. | 138 // This struct is not used outside of the PlzNavigate project. |
132 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 139 // PlzNavigate: parameters needed to start a navigation on the IO thread, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
365 ~NavigationParams(); | 372 ~NavigationParams(); |
366 | 373 |
367 CommonNavigationParams common_params; | 374 CommonNavigationParams common_params; |
368 StartNavigationParams start_params; | 375 StartNavigationParams start_params; |
369 RequestNavigationParams request_params; | 376 RequestNavigationParams request_params; |
370 }; | 377 }; |
371 | 378 |
372 } // namespace content | 379 } // namespace content |
373 | 380 |
374 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 381 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |