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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Used by all navigation IPCs. | 32 // Used by all navigation IPCs. |
33 struct CONTENT_EXPORT CommonNavigationParams { | 33 struct CONTENT_EXPORT CommonNavigationParams { |
34 CommonNavigationParams(); | 34 CommonNavigationParams(); |
35 CommonNavigationParams(const GURL& url, | 35 CommonNavigationParams(const GURL& url, |
36 const Referrer& referrer, | 36 const Referrer& referrer, |
37 ui::PageTransition transition, | 37 ui::PageTransition transition, |
38 FrameMsg_Navigate_Type::Value navigation_type, | 38 FrameMsg_Navigate_Type::Value navigation_type, |
39 bool allow_download, | 39 bool allow_download, |
40 base::TimeTicks ui_timestamp, | 40 base::TimeTicks ui_timestamp, |
41 FrameMsg_UILoadMetricsReportType::Value report_type); | 41 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 42 const GURL& base_url_for_data_url, |
| 43 const GURL& history_url_for_data_url); |
42 ~CommonNavigationParams(); | 44 ~CommonNavigationParams(); |
43 | 45 |
44 // The URL to navigate to. | 46 // The URL to navigate to. |
45 // PlzNavigate: May be modified when the navigation is ready to commit. | 47 // PlzNavigate: May be modified when the navigation is ready to commit. |
46 GURL url; | 48 GURL url; |
47 | 49 |
48 // The URL to send in the "Referer" header field. Can be empty if there is | 50 // The URL to send in the "Referer" header field. Can be empty if there is |
49 // no referrer. | 51 // no referrer. |
50 Referrer referrer; | 52 Referrer referrer; |
51 | 53 |
52 // The type of transition. | 54 // The type of transition. |
53 ui::PageTransition transition; | 55 ui::PageTransition transition; |
54 | 56 |
55 // Type of navigation. | 57 // Type of navigation. |
56 FrameMsg_Navigate_Type::Value navigation_type; | 58 FrameMsg_Navigate_Type::Value navigation_type; |
57 | 59 |
58 // Allows the URL to be downloaded (true by default). | 60 // Allows the URL to be downloaded (true by default). |
59 // Avoid downloading when in view-source mode. | 61 // Avoid downloading when in view-source mode. |
60 bool allow_download; | 62 bool allow_download; |
61 | 63 |
62 // Timestamp of the user input event that triggered this navigation. Empty if | 64 // Timestamp of the user input event that triggered this navigation. Empty if |
63 // the navigation was not triggered by clicking on a link or by receiving an | 65 // the navigation was not triggered by clicking on a link or by receiving an |
64 // intent on Android. | 66 // intent on Android. |
65 base::TimeTicks ui_timestamp; | 67 base::TimeTicks ui_timestamp; |
66 | 68 |
67 // The report type to be used when recording the metric using |ui_timestamp|. | 69 // The report type to be used when recording the metric using |ui_timestamp|. |
68 FrameMsg_UILoadMetricsReportType::Value report_type; | 70 FrameMsg_UILoadMetricsReportType::Value report_type; |
| 71 |
| 72 // Base URL for use in Blink's SubstituteData. |
| 73 // Is only used with data: URLs. |
| 74 GURL base_url_for_data_url; |
| 75 |
| 76 // History URL for use in Blink's SubstituteData. |
| 77 // Is only used with data: URLs. |
| 78 GURL history_url_for_data_url; |
69 }; | 79 }; |
70 | 80 |
71 // PlzNavigate: parameters needed to start a navigation on the IO thread. | 81 // PlzNavigate: parameters needed to start a navigation on the IO thread. |
72 struct CONTENT_EXPORT BeginNavigationParams { | 82 struct CONTENT_EXPORT BeginNavigationParams { |
73 // TODO(clamy): See if it is possible to reuse this in | 83 // TODO(clamy): See if it is possible to reuse this in |
74 // ResourceMsg_Request_Params. | 84 // ResourceMsg_Request_Params. |
75 BeginNavigationParams(); | 85 BeginNavigationParams(); |
76 BeginNavigationParams(std::string method, | 86 BeginNavigationParams(std::string method, |
77 std::string headers, | 87 std::string headers, |
78 int load_flags, | 88 int load_flags, |
(...skipping 29 matching lines...) Expand all Loading... |
108 | 118 |
109 // The navigationStart time to expose through the Navigation Timing API to JS. | 119 // The navigationStart time to expose through the Navigation Timing API to JS. |
110 base::TimeTicks browser_navigation_start; | 120 base::TimeTicks browser_navigation_start; |
111 | 121 |
112 // TODO(clamy): Move the redirect chain here. | 122 // TODO(clamy): Move the redirect chain here. |
113 }; | 123 }; |
114 | 124 |
115 } // namespace content | 125 } // namespace content |
116 | 126 |
117 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 127 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
OLD | NEW |