OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/frame_host/navigation_entry_impl.h" | 5 #include "content/browser/frame_host/navigation_entry_impl.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 has_post_data_(false), | 111 has_post_data_(false), |
112 post_id_(-1), | 112 post_id_(-1), |
113 restore_type_(RESTORE_NONE), | 113 restore_type_(RESTORE_NONE), |
114 is_overriding_user_agent_(false), | 114 is_overriding_user_agent_(false), |
115 http_status_code_(0), | 115 http_status_code_(0), |
116 is_renderer_initiated_(is_renderer_initiated), | 116 is_renderer_initiated_(is_renderer_initiated), |
117 should_replace_entry_(false), | 117 should_replace_entry_(false), |
118 should_clear_history_list_(false), | 118 should_clear_history_list_(false), |
119 can_load_local_resources_(false), | 119 can_load_local_resources_(false), |
120 frame_tree_node_id_(-1) { | 120 frame_tree_node_id_(-1) { |
| 121 #if defined(OS_ANDROID) |
| 122 has_user_gesture_ = false; |
| 123 #endif |
121 } | 124 } |
122 | 125 |
123 NavigationEntryImpl::~NavigationEntryImpl() { | 126 NavigationEntryImpl::~NavigationEntryImpl() { |
124 } | 127 } |
125 | 128 |
126 int NavigationEntryImpl::GetUniqueID() const { | 129 int NavigationEntryImpl::GetUniqueID() const { |
127 return unique_id_; | 130 return unique_id_; |
128 } | 131 } |
129 | 132 |
130 PageType NavigationEntryImpl::GetPageType() const { | 133 PageType NavigationEntryImpl::GetPageType() const { |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 std::vector<unsigned char> browser_initiated_post_data; | 462 std::vector<unsigned char> browser_initiated_post_data; |
460 if (GetBrowserInitiatedPostData()) { | 463 if (GetBrowserInitiatedPostData()) { |
461 browser_initiated_post_data.assign( | 464 browser_initiated_post_data.assign( |
462 GetBrowserInitiatedPostData()->front(), | 465 GetBrowserInitiatedPostData()->front(), |
463 GetBrowserInitiatedPostData()->front() + | 466 GetBrowserInitiatedPostData()->front() + |
464 GetBrowserInitiatedPostData()->size()); | 467 GetBrowserInitiatedPostData()->size()); |
465 } | 468 } |
466 | 469 |
467 return StartNavigationParams(GetHasPostData(), extra_headers(), | 470 return StartNavigationParams(GetHasPostData(), extra_headers(), |
468 browser_initiated_post_data, | 471 browser_initiated_post_data, |
| 472 #if defined(OS_ANDROID) |
| 473 has_user_gesture(), |
| 474 #endif |
469 transferred_global_request_id().child_id, | 475 transferred_global_request_id().child_id, |
470 transferred_global_request_id().request_id); | 476 transferred_global_request_id().request_id); |
471 } | 477 } |
472 | 478 |
473 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( | 479 RequestNavigationParams NavigationEntryImpl::ConstructRequestNavigationParams( |
474 const FrameNavigationEntry& frame_entry, | 480 const FrameNavigationEntry& frame_entry, |
475 base::TimeTicks navigation_start, | 481 base::TimeTicks navigation_start, |
476 bool is_same_document_history_load, | 482 bool is_same_document_history_load, |
477 bool has_committed_real_load, | 483 bool has_committed_real_load, |
478 bool intended_as_new_entry, | 484 bool intended_as_new_entry, |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
601 return node; | 607 return node; |
602 } | 608 } |
603 // Enqueue any children and keep looking. | 609 // Enqueue any children and keep looking. |
604 for (auto& child : node->children) | 610 for (auto& child : node->children) |
605 work_queue.push(child); | 611 work_queue.push(child); |
606 } | 612 } |
607 return nullptr; | 613 return nullptr; |
608 } | 614 } |
609 | 615 |
610 } // namespace content | 616 } // namespace content |
OLD | NEW |