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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <queue> | 9 #include <queue> |
10 #include <utility> | 10 #include <utility> |
(...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
664 | 664 |
665 return copy; | 665 return copy; |
666 } | 666 } |
667 | 667 |
668 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( | 668 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( |
669 const FrameNavigationEntry& frame_entry, | 669 const FrameNavigationEntry& frame_entry, |
670 const scoped_refptr<ResourceRequestBodyImpl>& post_body, | 670 const scoped_refptr<ResourceRequestBodyImpl>& post_body, |
671 const GURL& dest_url, | 671 const GURL& dest_url, |
672 const Referrer& dest_referrer, | 672 const Referrer& dest_referrer, |
673 FrameMsg_Navigate_Type::Value navigation_type, | 673 FrameMsg_Navigate_Type::Value navigation_type, |
674 LoFiState lofi_state, | 674 int previews_state, |
nasko
2016/12/08 22:19:32
PreviewsState
megjablon
2016/12/09 20:35:53
Done.
| |
675 const base::TimeTicks& navigation_start) const { | 675 const base::TimeTicks& navigation_start) const { |
676 FrameMsg_UILoadMetricsReportType::Value report_type = | 676 FrameMsg_UILoadMetricsReportType::Value report_type = |
677 FrameMsg_UILoadMetricsReportType::NO_REPORT; | 677 FrameMsg_UILoadMetricsReportType::NO_REPORT; |
678 base::TimeTicks ui_timestamp = base::TimeTicks(); | 678 base::TimeTicks ui_timestamp = base::TimeTicks(); |
679 #if defined(OS_ANDROID) | 679 #if defined(OS_ANDROID) |
680 if (!intent_received_timestamp().is_null()) | 680 if (!intent_received_timestamp().is_null()) |
681 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; | 681 report_type = FrameMsg_UILoadMetricsReportType::REPORT_INTENT; |
682 ui_timestamp = intent_received_timestamp(); | 682 ui_timestamp = intent_received_timestamp(); |
683 #endif | 683 #endif |
684 | 684 |
685 std::string method; | 685 std::string method; |
686 | 686 |
687 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use | 687 // TODO(clamy): Consult the FrameNavigationEntry in all modes that use |
688 // subframe navigation entries. | 688 // subframe navigation entries. |
689 if (IsBrowserSideNavigationEnabled()) | 689 if (IsBrowserSideNavigationEnabled()) |
690 method = frame_entry.method(); | 690 method = frame_entry.method(); |
691 else | 691 else |
692 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET"; | 692 method = (post_body.get() || GetHasPostData()) ? "POST" : "GET"; |
693 | 693 |
694 NavigationGesture gesture = NavigationGestureAuto; | 694 NavigationGesture gesture = NavigationGestureAuto; |
695 #if defined(OS_ANDROID) | 695 #if defined(OS_ANDROID) |
696 gesture = has_user_gesture() ? NavigationGestureUser : NavigationGestureAuto; | 696 gesture = has_user_gesture() ? NavigationGestureUser : NavigationGestureAuto; |
697 #endif | 697 #endif |
698 return CommonNavigationParams( | 698 return CommonNavigationParams( |
699 dest_url, dest_referrer, GetTransitionType(), navigation_type, gesture, | 699 dest_url, dest_referrer, GetTransitionType(), navigation_type, gesture, |
700 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, | 700 !IsViewSourceMode(), should_replace_entry(), ui_timestamp, report_type, |
701 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), lofi_state, | 701 GetBaseURLForDataURL(), GetHistoryURLForDataURL(), previews_state, |
702 navigation_start, method, post_body ? post_body : post_data_); | 702 navigation_start, method, post_body ? post_body : post_data_); |
703 } | 703 } |
704 | 704 |
705 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() | 705 StartNavigationParams NavigationEntryImpl::ConstructStartNavigationParams() |
706 const { | 706 const { |
707 return StartNavigationParams(extra_headers(), | 707 return StartNavigationParams(extra_headers(), |
708 transferred_global_request_id().child_id, | 708 transferred_global_request_id().child_id, |
709 transferred_global_request_id().request_id); | 709 transferred_global_request_id().request_id); |
710 } | 710 } |
711 | 711 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
956 return node; | 956 return node; |
957 | 957 |
958 // Enqueue any children and keep looking. | 958 // Enqueue any children and keep looking. |
959 for (auto* child : node->children) | 959 for (auto* child : node->children) |
960 work_queue.push(child); | 960 work_queue.push(child); |
961 } | 961 } |
962 return nullptr; | 962 return nullptr; |
963 } | 963 } |
964 | 964 |
965 } // namespace content | 965 } // namespace content |
OLD | NEW |