| 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 #include "content/common/navigation_params.h" | 5 #include "content/common/navigation_params.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "content/common/service_worker/service_worker_types.h" | 8 #include "content/common/service_worker/service_worker_types.h" |
| 9 #include "content/public/common/browser_side_navigation_policy.h" | 9 #include "content/public/common/browser_side_navigation_policy.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 !url.SchemeIs(url::kJavaScriptScheme) && !url.is_empty(); | 22 !url.SchemeIs(url::kJavaScriptScheme) && !url.is_empty(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 CommonNavigationParams::CommonNavigationParams() | 25 CommonNavigationParams::CommonNavigationParams() |
| 26 : transition(ui::PAGE_TRANSITION_LINK), | 26 : transition(ui::PAGE_TRANSITION_LINK), |
| 27 navigation_type(FrameMsg_Navigate_Type::NORMAL), | 27 navigation_type(FrameMsg_Navigate_Type::NORMAL), |
| 28 allow_download(true), | 28 allow_download(true), |
| 29 should_replace_current_entry(false), | 29 should_replace_current_entry(false), |
| 30 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), | 30 report_type(FrameMsg_UILoadMetricsReportType::NO_REPORT), |
| 31 lofi_state(LOFI_UNSPECIFIED), | 31 lofi_state(LOFI_UNSPECIFIED), |
| 32 navigation_start(base::TimeTicks::Now()) { | 32 navigation_start(base::TimeTicks::Now()), |
| 33 } | 33 is_post(false) {} |
| 34 | 34 |
| 35 CommonNavigationParams::CommonNavigationParams( | 35 CommonNavigationParams::CommonNavigationParams( |
| 36 const GURL& url, | 36 const GURL& url, |
| 37 const Referrer& referrer, | 37 const Referrer& referrer, |
| 38 ui::PageTransition transition, | 38 ui::PageTransition transition, |
| 39 FrameMsg_Navigate_Type::Value navigation_type, | 39 FrameMsg_Navigate_Type::Value navigation_type, |
| 40 bool allow_download, | 40 bool allow_download, |
| 41 bool should_replace_current_entry, | 41 bool should_replace_current_entry, |
| 42 base::TimeTicks ui_timestamp, | 42 base::TimeTicks ui_timestamp, |
| 43 FrameMsg_UILoadMetricsReportType::Value report_type, | 43 FrameMsg_UILoadMetricsReportType::Value report_type, |
| 44 const GURL& base_url_for_data_url, | 44 const GURL& base_url_for_data_url, |
| 45 const GURL& history_url_for_data_url, | 45 const GURL& history_url_for_data_url, |
| 46 LoFiState lofi_state, | 46 LoFiState lofi_state, |
| 47 const base::TimeTicks& navigation_start) | 47 const base::TimeTicks& navigation_start, |
| 48 bool is_post) |
| 48 : url(url), | 49 : url(url), |
| 49 referrer(referrer), | 50 referrer(referrer), |
| 50 transition(transition), | 51 transition(transition), |
| 51 navigation_type(navigation_type), | 52 navigation_type(navigation_type), |
| 52 allow_download(allow_download), | 53 allow_download(allow_download), |
| 53 should_replace_current_entry(should_replace_current_entry), | 54 should_replace_current_entry(should_replace_current_entry), |
| 54 ui_timestamp(ui_timestamp), | 55 ui_timestamp(ui_timestamp), |
| 55 report_type(report_type), | 56 report_type(report_type), |
| 56 base_url_for_data_url(base_url_for_data_url), | 57 base_url_for_data_url(base_url_for_data_url), |
| 57 history_url_for_data_url(history_url_for_data_url), | 58 history_url_for_data_url(history_url_for_data_url), |
| 58 lofi_state(lofi_state), | 59 lofi_state(lofi_state), |
| 59 navigation_start(navigation_start) { | 60 navigation_start(navigation_start), |
| 60 } | 61 is_post(is_post) {} |
| 61 | 62 |
| 62 CommonNavigationParams::~CommonNavigationParams() { | 63 CommonNavigationParams::~CommonNavigationParams() { |
| 63 } | 64 } |
| 64 | 65 |
| 65 BeginNavigationParams::BeginNavigationParams() | 66 BeginNavigationParams::BeginNavigationParams() |
| 66 : load_flags(0), | 67 : load_flags(0), |
| 67 has_user_gesture(false), | 68 has_user_gesture(false), |
| 68 skip_service_worker(false), | 69 skip_service_worker(false), |
| 69 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} | 70 request_context_type(REQUEST_CONTEXT_TYPE_LOCATION) {} |
| 70 | 71 |
| 71 BeginNavigationParams::BeginNavigationParams( | 72 BeginNavigationParams::BeginNavigationParams( |
| 72 std::string method, | |
| 73 std::string headers, | 73 std::string headers, |
| 74 int load_flags, | 74 int load_flags, |
| 75 bool has_user_gesture, | 75 bool has_user_gesture, |
| 76 bool skip_service_worker, | 76 bool skip_service_worker, |
| 77 RequestContextType request_context_type) | 77 RequestContextType request_context_type) |
| 78 : method(method), | 78 : headers(headers), |
| 79 headers(headers), | |
| 80 load_flags(load_flags), | 79 load_flags(load_flags), |
| 81 has_user_gesture(has_user_gesture), | 80 has_user_gesture(has_user_gesture), |
| 82 skip_service_worker(skip_service_worker), | 81 skip_service_worker(skip_service_worker), |
| 83 request_context_type(request_context_type) {} | 82 request_context_type(request_context_type) {} |
| 84 | 83 |
| 85 StartNavigationParams::StartNavigationParams() | 84 StartNavigationParams::StartNavigationParams() |
| 86 : is_post(false), | 85 : |
| 87 #if defined(OS_ANDROID) | 86 #if defined(OS_ANDROID) |
| 88 has_user_gesture(false), | 87 has_user_gesture(false), |
| 89 #endif | 88 #endif |
| 90 transferred_request_child_id(-1), | 89 transferred_request_child_id(-1), |
| 91 transferred_request_request_id(-1) { | 90 transferred_request_request_id(-1) { |
| 92 } | 91 } |
| 93 | 92 |
| 94 StartNavigationParams::StartNavigationParams( | 93 StartNavigationParams::StartNavigationParams( |
| 95 bool is_post, | |
| 96 const std::string& extra_headers, | 94 const std::string& extra_headers, |
| 97 const std::vector<unsigned char>& browser_initiated_post_data, | 95 const std::vector<unsigned char>& browser_initiated_post_data, |
| 98 #if defined(OS_ANDROID) | 96 #if defined(OS_ANDROID) |
| 99 bool has_user_gesture, | 97 bool has_user_gesture, |
| 100 #endif | 98 #endif |
| 101 int transferred_request_child_id, | 99 int transferred_request_child_id, |
| 102 int transferred_request_request_id) | 100 int transferred_request_request_id) |
| 103 : is_post(is_post), | 101 : extra_headers(extra_headers), |
| 104 extra_headers(extra_headers), | |
| 105 browser_initiated_post_data(browser_initiated_post_data), | 102 browser_initiated_post_data(browser_initiated_post_data), |
| 106 #if defined(OS_ANDROID) | 103 #if defined(OS_ANDROID) |
| 107 has_user_gesture(has_user_gesture), | 104 has_user_gesture(has_user_gesture), |
| 108 #endif | 105 #endif |
| 109 transferred_request_child_id(transferred_request_child_id), | 106 transferred_request_child_id(transferred_request_child_id), |
| 110 transferred_request_request_id(transferred_request_request_id) { | 107 transferred_request_request_id(transferred_request_request_id) { |
| 111 } | 108 } |
| 112 | 109 |
| 113 StartNavigationParams::~StartNavigationParams() { | 110 StartNavigationParams::~StartNavigationParams() { |
| 114 } | 111 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 const RequestNavigationParams& request_params) | 170 const RequestNavigationParams& request_params) |
| 174 : common_params(common_params), | 171 : common_params(common_params), |
| 175 start_params(start_params), | 172 start_params(start_params), |
| 176 request_params(request_params) { | 173 request_params(request_params) { |
| 177 } | 174 } |
| 178 | 175 |
| 179 NavigationParams::~NavigationParams() { | 176 NavigationParams::~NavigationParams() { |
| 180 } | 177 } |
| 181 | 178 |
| 182 } // namespace content | 179 } // namespace content |
| OLD | NEW |