Chromium Code Reviews| 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" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/common/frame_message_enums.h" | 13 #include "content/common/frame_message_enums.h" |
| 14 #include "content/public/common/page_state.h" | 14 #include "content/public/common/page_state.h" |
| 15 #include "content/public/common/referrer.h" | 15 #include "content/public/common/referrer.h" |
| 16 #include "content/public/common/request_context_type.h" | 16 #include "content/public/common/request_context_type.h" |
| 17 #include "ui/base/page_transition_types.h" | 17 #include "ui/base/page_transition_types.h" |
| 18 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 19 | 19 |
| 20 namespace base { | |
| 21 class RefCountedMemory; | |
| 22 } | |
| 23 | |
| 24 namespace content { | 20 namespace content { |
| 25 | 21 |
| 26 // The LoFi state which determines whether to add the Lo-Fi header. | 22 // The LoFi state which determines whether to add the Lo-Fi header. |
| 27 enum LoFiState { | 23 enum LoFiState { |
| 28 // Let the browser process decide whether or not to request the Lo-Fi version. | 24 // Let the browser process decide whether or not to request the Lo-Fi version. |
| 29 LOFI_UNSPECIFIED = 0, | 25 LOFI_UNSPECIFIED = 0, |
| 30 | 26 |
| 31 // Request a normal (non-Lo-Fi) version of the resource. | 27 // Request a normal (non-Lo-Fi) version of the resource. |
| 32 LOFI_OFF, | 28 LOFI_OFF, |
| 33 | 29 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 53 CommonNavigationParams(const GURL& url, | 49 CommonNavigationParams(const GURL& url, |
| 54 const Referrer& referrer, | 50 const Referrer& referrer, |
| 55 ui::PageTransition transition, | 51 ui::PageTransition transition, |
| 56 FrameMsg_Navigate_Type::Value navigation_type, | 52 FrameMsg_Navigate_Type::Value navigation_type, |
| 57 bool allow_download, | 53 bool allow_download, |
| 58 bool should_replace_current_entry, | 54 bool should_replace_current_entry, |
| 59 base::TimeTicks ui_timestamp, | 55 base::TimeTicks ui_timestamp, |
| 60 FrameMsg_UILoadMetricsReportType::Value report_type, | 56 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 61 const GURL& base_url_for_data_url, | 57 const GURL& base_url_for_data_url, |
| 62 const GURL& history_url_for_data_url, | 58 const GURL& history_url_for_data_url, |
| 59 const std::string& data_url_as_string, | |
| 63 LoFiState lofi_state, | 60 LoFiState lofi_state, |
| 64 const base::TimeTicks& navigation_start); | 61 const base::TimeTicks& navigation_start); |
| 65 ~CommonNavigationParams(); | 62 ~CommonNavigationParams(); |
| 66 | 63 |
| 67 // The URL to navigate to. | 64 // The URL to navigate to. |
| 68 // PlzNavigate: May be modified when the navigation is ready to commit. | 65 // PlzNavigate: May be modified when the navigation is ready to commit. |
| 69 GURL url; | 66 GURL url; |
| 70 | 67 |
| 71 // The URL to send in the "Referer" header field. Can be empty if there is | 68 // The URL to send in the "Referer" header field. Can be empty if there is |
| 72 // no referrer. | 69 // no referrer. |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 98 FrameMsg_UILoadMetricsReportType::Value report_type; | 95 FrameMsg_UILoadMetricsReportType::Value report_type; |
| 99 | 96 |
| 100 // Base URL for use in Blink's SubstituteData. | 97 // Base URL for use in Blink's SubstituteData. |
| 101 // Is only used with data: URLs. | 98 // Is only used with data: URLs. |
| 102 GURL base_url_for_data_url; | 99 GURL base_url_for_data_url; |
| 103 | 100 |
| 104 // History URL for use in Blink's SubstituteData. | 101 // History URL for use in Blink's SubstituteData. |
| 105 // Is only used with data: URLs. | 102 // Is only used with data: URLs. |
| 106 GURL history_url_for_data_url; | 103 GURL history_url_for_data_url; |
| 107 | 104 |
| 105 // The real content of the data: URL. Used to circumvent the restriction | |
| 106 // on the GURL max length. Note that it may only be passed from browser | |
| 107 // to renderer, not vice versa. | |
|
boliu
2015/12/09 19:33:02
(only read up to this point) how is renderer->brow
| |
| 108 std::string data_url_as_string; | |
| 109 | |
| 108 // Whether or not to request a LoFi version of the document or let the browser | 110 // Whether or not to request a LoFi version of the document or let the browser |
| 109 // decide. | 111 // decide. |
| 110 LoFiState lofi_state; | 112 LoFiState lofi_state; |
| 111 | 113 |
| 112 // The navigationStart time exposed through the Navigation Timing API to JS. | 114 // The navigationStart time exposed through the Navigation Timing API to JS. |
| 113 // If this is for a browser-initiated navigation, this can override the | 115 // If this is for a browser-initiated navigation, this can override the |
| 114 // navigation_start value in Blink. | 116 // navigation_start value in Blink. |
| 115 // PlzNavigate: For renderer initiated navigations, this will be set on the | 117 // PlzNavigate: For renderer initiated navigations, this will be set on the |
| 116 // renderer side and sent with FrameHostMsg_BeginNavigation. | 118 // renderer side and sent with FrameHostMsg_BeginNavigation. |
| 117 base::TimeTicks navigation_start; | 119 base::TimeTicks navigation_start; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 ~NavigationParams(); | 311 ~NavigationParams(); |
| 310 | 312 |
| 311 CommonNavigationParams common_params; | 313 CommonNavigationParams common_params; |
| 312 StartNavigationParams start_params; | 314 StartNavigationParams start_params; |
| 313 RequestNavigationParams request_params; | 315 RequestNavigationParams request_params; |
| 314 }; | 316 }; |
| 315 | 317 |
| 316 } // namespace content | 318 } // namespace content |
| 317 | 319 |
| 318 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 320 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |