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