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 "ui/base/page_transition_types.h" | 16 #include "ui/base/page_transition_types.h" |
| 17 #include "url/gurl.h" | 17 #include "url/gurl.h" |
| 18 | 18 |
| 19 namespace base { | 19 namespace base { |
| 20 class RefCountedMemory; | 20 class RefCountedMemory; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 // The LoFi state which determines whether to add the Lo-Fi header. | |
| 26 enum LoFiState { | |
| 27 // Let the browser process decide whether or not to request the Lo-Fi version. | |
| 28 LOFI_UNSPECIFIED = 0, | |
| 29 // Request a normal (non-Lo-Fi) version of the resource. | |
|
nasko
2015/10/01 18:28:57
nit: Empty line between the enum value and the com
megjablon
2015/10/01 19:43:25
Done.
| |
| 30 LOFI_OFF, | |
| 31 // Request a Lo-Fi version of the resource. | |
| 32 LOFI_ON, | |
| 33 }; | |
| 34 | |
| 25 // PlzNavigate | 35 // PlzNavigate |
| 26 // Helper function to determine if the navigation to |url| should make a request | 36 // Helper function to determine if the navigation to |url| should make a request |
| 27 // to the network stack. A request should not be sent for data URLs, JavaScript | 37 // to the network stack. A request should not be sent for data URLs, JavaScript |
| 28 // URLs or about:blank. In these cases, no request needs to be sent. | 38 // URLs or about:blank. In these cases, no request needs to be sent. |
| 29 bool ShouldMakeNetworkRequestForURL(const GURL& url); | 39 bool ShouldMakeNetworkRequestForURL(const GURL& url); |
| 30 | 40 |
| 31 // The following structures hold parameters used during a navigation. In | 41 // The following structures hold parameters used during a navigation. In |
| 32 // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and | 42 // particular they are used by FrameMsg_Navigate, FrameMsg_CommitNavigation and |
| 33 // FrameHostMsg_BeginNavigation. | 43 // FrameHostMsg_BeginNavigation. |
| 34 | 44 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 82 // The report type to be used when recording the metric using |ui_timestamp|. | 92 // The report type to be used when recording the metric using |ui_timestamp|. |
| 83 FrameMsg_UILoadMetricsReportType::Value report_type; | 93 FrameMsg_UILoadMetricsReportType::Value report_type; |
| 84 | 94 |
| 85 // Base URL for use in Blink's SubstituteData. | 95 // Base URL for use in Blink's SubstituteData. |
| 86 // Is only used with data: URLs. | 96 // Is only used with data: URLs. |
| 87 GURL base_url_for_data_url; | 97 GURL base_url_for_data_url; |
| 88 | 98 |
| 89 // History URL for use in Blink's SubstituteData. | 99 // History URL for use in Blink's SubstituteData. |
| 90 // Is only used with data: URLs. | 100 // Is only used with data: URLs. |
| 91 GURL history_url_for_data_url; | 101 GURL history_url_for_data_url; |
| 102 | |
| 103 // Whether or not to request a LoFi version of the document or let the browser | |
| 104 // decide. | |
| 105 LoFiState lofi_state; | |
|
nasko
2015/10/01 18:28:57
It might be good to add clamy@, as an FYI on this
megjablon
2015/10/01 19:43:25
Done.
| |
| 92 }; | 106 }; |
| 93 | 107 |
| 94 // Provided by the renderer ---------------------------------------------------- | 108 // Provided by the renderer ---------------------------------------------------- |
| 95 // | 109 // |
| 96 // This struct holds parameters sent by the renderer to the browser. It is only | 110 // This struct holds parameters sent by the renderer to the browser. It is only |
| 97 // used in PlzNavigate (since in the current architecture, the renderer does not | 111 // used in PlzNavigate (since in the current architecture, the renderer does not |
| 98 // inform the browser of navigations until they commit). | 112 // inform the browser of navigations until they commit). |
| 99 | 113 |
| 100 // This struct is not used outside of the PlzNavigate project. | 114 // This struct is not used outside of the PlzNavigate project. |
| 101 // PlzNavigate: parameters needed to start a navigation on the IO thread, | 115 // PlzNavigate: parameters needed to start a navigation on the IO thread, |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 ~NavigationParams(); | 282 ~NavigationParams(); |
| 269 | 283 |
| 270 CommonNavigationParams common_params; | 284 CommonNavigationParams common_params; |
| 271 StartNavigationParams start_params; | 285 StartNavigationParams start_params; |
| 272 RequestNavigationParams request_params; | 286 RequestNavigationParams request_params; |
| 273 }; | 287 }; |
| 274 | 288 |
| 275 } // namespace content | 289 } // namespace content |
| 276 | 290 |
| 277 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ | 291 #endif // CONTENT_COMMON_NAVIGATION_PARAMS_H_ |
| OLD | NEW |