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> |
11 | 11 |
12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
14 #include "base/metrics/histogram_macros.h" | 14 #include "base/metrics/histogram_macros.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
18 #include "components/url_formatter/url_formatter.h" | 18 #include "components/url_formatter/url_formatter.h" |
19 #include "content/common/content_constants_internal.h" | 19 #include "content/common/content_constants_internal.h" |
20 #include "content/common/navigation_params.h" | 20 #include "content/common/navigation_params.h" |
21 #include "content/common/page_state_serialization.h" | 21 #include "content/common/page_state_serialization.h" |
22 #include "content/common/resource_request_body_impl.h" | |
23 #include "content/common/site_isolation_policy.h" | 22 #include "content/common/site_isolation_policy.h" |
24 #include "content/public/browser/reload_type.h" | 23 #include "content/public/browser/reload_type.h" |
25 #include "content/public/common/browser_side_navigation_policy.h" | 24 #include "content/public/common/browser_side_navigation_policy.h" |
26 #include "content/public/common/content_constants.h" | 25 #include "content/public/common/content_constants.h" |
27 #include "content/public/common/url_constants.h" | 26 #include "content/public/common/url_constants.h" |
28 #include "ui/gfx/text_elider.h" | 27 #include "ui/gfx/text_elider.h" |
29 | 28 |
30 using base::UTF16ToUTF8; | 29 using base::UTF16ToUTF8; |
31 | 30 |
32 namespace content { | 31 namespace content { |
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 void NavigationEntryImpl::SetPostID(int64_t post_id) { | 482 void NavigationEntryImpl::SetPostID(int64_t post_id) { |
484 frame_tree_->frame_entry->set_post_id(post_id); | 483 frame_tree_->frame_entry->set_post_id(post_id); |
485 } | 484 } |
486 | 485 |
487 int64_t NavigationEntryImpl::GetPostID() const { | 486 int64_t NavigationEntryImpl::GetPostID() const { |
488 return frame_tree_->frame_entry->post_id(); | 487 return frame_tree_->frame_entry->post_id(); |
489 } | 488 } |
490 | 489 |
491 void NavigationEntryImpl::SetPostData( | 490 void NavigationEntryImpl::SetPostData( |
492 const scoped_refptr<ResourceRequestBody>& data) { | 491 const scoped_refptr<ResourceRequestBody>& data) { |
493 post_data_ = static_cast<ResourceRequestBodyImpl*>(data.get()); | 492 post_data_ = static_cast<ResourceRequestBody*>(data.get()); |
494 } | 493 } |
495 | 494 |
496 scoped_refptr<ResourceRequestBody> NavigationEntryImpl::GetPostData() const { | 495 scoped_refptr<ResourceRequestBody> NavigationEntryImpl::GetPostData() const { |
497 return post_data_.get(); | 496 return post_data_.get(); |
498 } | 497 } |
499 | 498 |
500 | 499 |
501 const FaviconStatus& NavigationEntryImpl::GetFavicon() const { | 500 const FaviconStatus& NavigationEntryImpl::GetFavicon() const { |
502 return favicon_; | 501 return favicon_; |
503 } | 502 } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 copy->has_user_gesture_ = has_user_gesture_; | 649 copy->has_user_gesture_ = has_user_gesture_; |
651 #endif | 650 #endif |
652 // ResetForCommit: reload_type_ | 651 // ResetForCommit: reload_type_ |
653 copy->extra_data_ = extra_data_; | 652 copy->extra_data_ = extra_data_; |
654 | 653 |
655 return copy; | 654 return copy; |
656 } | 655 } |
657 | 656 |
658 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( | 657 CommonNavigationParams NavigationEntryImpl::ConstructCommonNavigationParams( |
659 const FrameNavigationEntry& frame_entry, | 658 const FrameNavigationEntry& frame_entry, |
660 const scoped_refptr<ResourceRequestBodyImpl>& post_body, | 659 const scoped_refptr<ResourceRequestBody>& post_body, |
661 const GURL& dest_url, | 660 const GURL& dest_url, |
662 const Referrer& dest_referrer, | 661 const Referrer& dest_referrer, |
663 FrameMsg_Navigate_Type::Value navigation_type, | 662 FrameMsg_Navigate_Type::Value navigation_type, |
664 PreviewsState previews_state, | 663 PreviewsState previews_state, |
665 const base::TimeTicks& navigation_start) const { | 664 const base::TimeTicks& navigation_start) const { |
666 FrameMsg_UILoadMetricsReportType::Value report_type = | 665 FrameMsg_UILoadMetricsReportType::Value report_type = |
667 FrameMsg_UILoadMetricsReportType::NO_REPORT; | 666 FrameMsg_UILoadMetricsReportType::NO_REPORT; |
668 base::TimeTicks ui_timestamp = base::TimeTicks(); | 667 base::TimeTicks ui_timestamp = base::TimeTicks(); |
669 #if defined(OS_ANDROID) | 668 #if defined(OS_ANDROID) |
670 if (!intent_received_timestamp().is_null()) | 669 if (!intent_received_timestamp().is_null()) |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
953 return node; | 952 return node; |
954 | 953 |
955 // Enqueue any children and keep looking. | 954 // Enqueue any children and keep looking. |
956 for (const auto& child : node->children) | 955 for (const auto& child : node->children) |
957 work_queue.push(child.get()); | 956 work_queue.push(child.get()); |
958 } | 957 } |
959 return nullptr; | 958 return nullptr; |
960 } | 959 } |
961 | 960 |
962 } // namespace content | 961 } // namespace content |
OLD | NEW |