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> |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/optional.h" | 14 #include "base/optional.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
18 #include "content/common/content_security_policy/csp_disposition_enum.h" | |
19 #include "content/common/frame_message_enums.h" | 18 #include "content/common/frame_message_enums.h" |
20 #include "content/common/resource_request_body_impl.h" | 19 #include "content/common/resource_request_body_impl.h" |
21 #include "content/public/common/page_state.h" | 20 #include "content/public/common/page_state.h" |
22 #include "content/public/common/previews_state.h" | 21 #include "content/public/common/previews_state.h" |
23 #include "content/public/common/referrer.h" | 22 #include "content/public/common/referrer.h" |
24 #include "content/public/common/request_context_type.h" | 23 #include "content/public/common/request_context_type.h" |
25 #include "content/public/common/resource_response.h" | 24 #include "content/public/common/resource_response.h" |
26 #include "net/url_request/redirect_info.h" | 25 #include "net/url_request/redirect_info.h" |
27 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" | 26 #include "third_party/WebKit/public/platform/WebMixedContentContextType.h" |
28 #include "ui/base/page_transition_types.h" | 27 #include "ui/base/page_transition_types.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 bool allow_download, | 68 bool allow_download, |
70 bool should_replace_current_entry, | 69 bool should_replace_current_entry, |
71 base::TimeTicks ui_timestamp, | 70 base::TimeTicks ui_timestamp, |
72 FrameMsg_UILoadMetricsReportType::Value report_type, | 71 FrameMsg_UILoadMetricsReportType::Value report_type, |
73 const GURL& base_url_for_data_url, | 72 const GURL& base_url_for_data_url, |
74 const GURL& history_url_for_data_url, | 73 const GURL& history_url_for_data_url, |
75 PreviewsState previews_state, | 74 PreviewsState previews_state, |
76 const base::TimeTicks& navigation_start, | 75 const base::TimeTicks& navigation_start, |
77 std::string method, | 76 std::string method, |
78 const scoped_refptr<ResourceRequestBodyImpl>& post_data, | 77 const scoped_refptr<ResourceRequestBodyImpl>& post_data, |
79 base::Optional<SourceLocation> source_location, | 78 base::Optional<SourceLocation> source_location); |
80 CSPDisposition should_check_main_world_csp); | |
81 CommonNavigationParams(const CommonNavigationParams& other); | 79 CommonNavigationParams(const CommonNavigationParams& other); |
82 ~CommonNavigationParams(); | 80 ~CommonNavigationParams(); |
83 | 81 |
84 // The URL to navigate to. | 82 // The URL to navigate to. |
85 // PlzNavigate: May be modified when the navigation is ready to commit. | 83 // PlzNavigate: May be modified when the navigation is ready to commit. |
86 GURL url; | 84 GURL url; |
87 | 85 |
88 // The URL to send in the "Referer" header field. Can be empty if there is | 86 // The URL to send in the "Referer" header field. Can be empty if there is |
89 // no referrer. | 87 // no referrer. |
90 Referrer referrer; | 88 Referrer referrer; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 | 133 |
136 // The request method: GET, POST, etc. | 134 // The request method: GET, POST, etc. |
137 std::string method; | 135 std::string method; |
138 | 136 |
139 // Body of HTTP POST request. | 137 // Body of HTTP POST request. |
140 scoped_refptr<ResourceRequestBodyImpl> post_data; | 138 scoped_refptr<ResourceRequestBodyImpl> post_data; |
141 | 139 |
142 // PlzNavigate | 140 // PlzNavigate |
143 // Information about the Javascript source for this navigation. Used for | 141 // Information about the Javascript source for this navigation. Used for |
144 // providing information in console error messages triggered by the | 142 // providing information in console error messages triggered by the |
145 // navigation. If the navigation was not caused by Javascript, this should | 143 // navigation. If the navigation was not caused by Javascript, this should not |
146 // not be set. | 144 // be set. |
147 base::Optional<SourceLocation> source_location; | 145 base::Optional<SourceLocation> source_location; |
148 | |
149 // Whether or not the CSP of the main world should apply. When the navigation | |
150 // is initiated from a content script in an isolated world, the CSP defined | |
151 // in the main world should not apply. | |
152 // TODO(arthursonzogni): Instead of this boolean, the origin of the isolated | |
153 // world which has initiated the navigation should be passed. | |
154 // See https://crbug.com/702540 | |
155 CSPDisposition should_check_main_world_csp; | |
156 }; | 146 }; |
157 | 147 |
158 // Provided by the renderer ---------------------------------------------------- | 148 // Provided by the renderer ---------------------------------------------------- |
159 // | 149 // |
160 // This struct holds parameters sent by the renderer to the browser. It is only | 150 // This struct holds parameters sent by the renderer to the browser. It is only |
161 // used in PlzNavigate (since in the current architecture, the renderer does not | 151 // used in PlzNavigate (since in the current architecture, the renderer does not |
162 // inform the browser of navigations until they commit). | 152 // inform the browser of navigations until they commit). |
163 | 153 |
164 // This struct is not used outside of the PlzNavigate project. | 154 // This struct is not used outside of the PlzNavigate project. |
165 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 155 // PlzNavigate: parameters needed to start a navigation on the IO thread, |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 ~NavigationParams(); | 388 ~NavigationParams(); |
399 | 389 |
400 CommonNavigationParams common_params; | 390 CommonNavigationParams common_params; |
401 StartNavigationParams start_params; | 391 StartNavigationParams start_params; |
402 RequestNavigationParams request_params; | 392 RequestNavigationParams request_params; |
403 }; | 393 }; |
404 | 394 |
405 } // namespace content | 395 } // namespace content |
406 | 396 |
407 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 397 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |