| 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 "base/memory/ref_counted_memory.h" | 7 #include "base/memory/ref_counted_memory.h" |
| 8 | 8 |
| 9 namespace content { | 9 namespace content { |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 ui_timestamp(ui_timestamp), | 33 ui_timestamp(ui_timestamp), |
| 34 report_type(report_type), | 34 report_type(report_type), |
| 35 base_url_for_data_url(base_url_for_data_url), | 35 base_url_for_data_url(base_url_for_data_url), |
| 36 history_url_for_data_url(history_url_for_data_url) { | 36 history_url_for_data_url(history_url_for_data_url) { |
| 37 } | 37 } |
| 38 | 38 |
| 39 CommonNavigationParams::~CommonNavigationParams() { | 39 CommonNavigationParams::~CommonNavigationParams() { |
| 40 } | 40 } |
| 41 | 41 |
| 42 BeginNavigationParams::BeginNavigationParams() | 42 BeginNavigationParams::BeginNavigationParams() |
| 43 : load_flags(0), | 43 : load_flags(0), has_user_gesture(false) { |
| 44 has_user_gesture(false) { | |
| 45 } | 44 } |
| 46 | 45 |
| 47 BeginNavigationParams::BeginNavigationParams(std::string method, | 46 BeginNavigationParams::BeginNavigationParams(std::string method, |
| 48 std::string headers, | 47 std::string headers, |
| 49 int load_flags, | 48 int load_flags, |
| 50 bool has_user_gesture) | 49 bool has_user_gesture) |
| 51 : method(method), | 50 : method(method), |
| 52 headers(headers), | 51 headers(headers), |
| 53 load_flags(load_flags), | 52 load_flags(load_flags), |
| 54 has_user_gesture(has_user_gesture) { | 53 has_user_gesture(has_user_gesture) { |
| 55 } | 54 } |
| 56 | 55 |
| 57 CommitNavigationParams::CommitNavigationParams() | 56 StartNavigationParams::StartNavigationParams() |
| 57 : is_post(false), |
| 58 should_replace_current_entry(false), |
| 59 transferred_request_child_id(-1), |
| 60 transferred_request_request_id(-1) { |
| 61 } |
| 62 |
| 63 StartNavigationParams::StartNavigationParams( |
| 64 bool is_post, |
| 65 const std::string& extra_headers, |
| 66 const std::vector<unsigned char>& browser_initiated_post_data, |
| 67 bool should_replace_current_entry, |
| 68 int transferred_request_child_id, |
| 69 int transferred_request_request_id) |
| 70 : is_post(is_post), |
| 71 extra_headers(extra_headers), |
| 72 browser_initiated_post_data(browser_initiated_post_data), |
| 73 should_replace_current_entry(should_replace_current_entry), |
| 74 transferred_request_child_id(transferred_request_child_id), |
| 75 transferred_request_request_id(transferred_request_request_id) { |
| 76 } |
| 77 |
| 78 StartNavigationParams::~StartNavigationParams() { |
| 79 } |
| 80 |
| 81 RequestNavigationParams::RequestNavigationParams() |
| 58 : is_overriding_user_agent(false), | 82 : is_overriding_user_agent(false), |
| 59 browser_navigation_start(base::TimeTicks::Now()), | 83 browser_navigation_start(base::TimeTicks::Now()), |
| 60 can_load_local_resources(false), | 84 can_load_local_resources(false), |
| 61 request_time(base::Time::Now()) { | 85 request_time(base::Time::Now()), |
| 62 } | 86 page_id(-1), |
| 63 | |
| 64 CommitNavigationParams::CommitNavigationParams( | |
| 65 bool is_overriding_user_agent, | |
| 66 base::TimeTicks navigation_start, | |
| 67 const std::vector<GURL>& redirects, | |
| 68 bool can_load_local_resources, | |
| 69 const std::string& frame_to_navigate, | |
| 70 base::Time request_time) | |
| 71 : is_overriding_user_agent(is_overriding_user_agent), | |
| 72 browser_navigation_start(navigation_start), | |
| 73 redirects(redirects), | |
| 74 can_load_local_resources(can_load_local_resources), | |
| 75 frame_to_navigate(frame_to_navigate), | |
| 76 request_time(request_time) { | |
| 77 } | |
| 78 | |
| 79 CommitNavigationParams::~CommitNavigationParams() {} | |
| 80 | |
| 81 HistoryNavigationParams::HistoryNavigationParams() | |
| 82 : page_id(-1), | |
| 83 pending_history_list_offset(-1), | 87 pending_history_list_offset(-1), |
| 84 current_history_list_offset(-1), | 88 current_history_list_offset(-1), |
| 85 current_history_list_length(0), | 89 current_history_list_length(0), |
| 86 should_clear_history_list(false) { | 90 should_clear_history_list(false) { |
| 87 } | 91 } |
| 88 | 92 |
| 89 HistoryNavigationParams::HistoryNavigationParams( | 93 RequestNavigationParams::RequestNavigationParams( |
| 94 bool is_overriding_user_agent, |
| 95 base::TimeTicks navigation_start, |
| 96 const std::vector<GURL>& redirects, |
| 97 bool can_load_local_resources, |
| 98 const std::string& frame_to_navigate, |
| 99 base::Time request_time, |
| 90 const PageState& page_state, | 100 const PageState& page_state, |
| 91 int32 page_id, | 101 int32 page_id, |
| 92 int pending_history_list_offset, | 102 int pending_history_list_offset, |
| 93 int current_history_list_offset, | 103 int current_history_list_offset, |
| 94 int current_history_list_length, | 104 int current_history_list_length, |
| 95 bool should_clear_history_list) | 105 bool should_clear_history_list) |
| 96 : page_state(page_state), | 106 : is_overriding_user_agent(is_overriding_user_agent), |
| 107 browser_navigation_start(navigation_start), |
| 108 redirects(redirects), |
| 109 can_load_local_resources(can_load_local_resources), |
| 110 frame_to_navigate(frame_to_navigate), |
| 111 request_time(request_time), |
| 112 page_state(page_state), |
| 97 page_id(page_id), | 113 page_id(page_id), |
| 98 pending_history_list_offset(pending_history_list_offset), | 114 pending_history_list_offset(pending_history_list_offset), |
| 99 current_history_list_offset(current_history_list_offset), | 115 current_history_list_offset(current_history_list_offset), |
| 100 current_history_list_length(current_history_list_length), | 116 current_history_list_length(current_history_list_length), |
| 101 should_clear_history_list(should_clear_history_list) { | 117 should_clear_history_list(should_clear_history_list) { |
| 102 } | 118 } |
| 103 | 119 |
| 104 HistoryNavigationParams::~HistoryNavigationParams() { | 120 RequestNavigationParams::~RequestNavigationParams() { |
| 105 } | |
| 106 | |
| 107 StartNavigationParams::StartNavigationParams() | |
| 108 : is_post(false), | |
| 109 should_replace_current_entry(false), | |
| 110 transferred_request_child_id(-1), | |
| 111 transferred_request_request_id(-1) { | |
| 112 } | |
| 113 | |
| 114 StartNavigationParams::StartNavigationParams( | |
| 115 bool is_post, | |
| 116 const std::string& extra_headers, | |
| 117 const std::vector<unsigned char>& browser_initiated_post_data, | |
| 118 bool should_replace_current_entry, | |
| 119 int transferred_request_child_id, | |
| 120 int transferred_request_request_id) | |
| 121 : is_post(is_post), | |
| 122 extra_headers(extra_headers), | |
| 123 browser_initiated_post_data(browser_initiated_post_data), | |
| 124 should_replace_current_entry(should_replace_current_entry), | |
| 125 transferred_request_child_id(transferred_request_child_id), | |
| 126 transferred_request_request_id(transferred_request_request_id) { | |
| 127 } | |
| 128 | |
| 129 StartNavigationParams::~StartNavigationParams() { | |
| 130 } | 121 } |
| 131 | 122 |
| 132 NavigationParams::NavigationParams( | 123 NavigationParams::NavigationParams( |
| 133 const CommonNavigationParams& common_params, | 124 const CommonNavigationParams& common_params, |
| 134 const StartNavigationParams& start_params, | 125 const StartNavigationParams& start_params, |
| 135 const CommitNavigationParams& commit_params, | 126 const RequestNavigationParams& request_params) |
| 136 const HistoryNavigationParams& history_params) | |
| 137 : common_params(common_params), | 127 : common_params(common_params), |
| 138 start_params(start_params), | 128 start_params(start_params), |
| 139 commit_params(commit_params), | 129 request_params(request_params) { |
| 140 history_params(history_params) { | |
| 141 } | 130 } |
| 142 | 131 |
| 143 NavigationParams::~NavigationParams() { | 132 NavigationParams::~NavigationParams() { |
| 144 } | 133 } |
| 145 | 134 |
| 146 } // namespace content | 135 } // namespace content |
| OLD | NEW |