Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1213)

Unified Diff: content/browser/frame_host/navigation_handle_impl.cc

Issue 2638423008: Convert ContentFaviconDriver to use the new navigation callbacks. (Closed)
Patch Set: add comment Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigation_handle_impl.cc
diff --git a/content/browser/frame_host/navigation_handle_impl.cc b/content/browser/frame_host/navigation_handle_impl.cc
index 30536bd306c76c4da490f9ea142210612c907d0c..44547e2d710872c02b28a3776ec47843c9e9487f 100644
--- a/content/browser/frame_host/navigation_handle_impl.cc
+++ b/content/browser/frame_host/navigation_handle_impl.cc
@@ -16,6 +16,8 @@
#include "content/browser/frame_host/ancestor_throttle.h"
#include "content/browser/frame_host/debug_urls.h"
#include "content/browser/frame_host/frame_tree_node.h"
+#include "content/browser/frame_host/navigation_controller_impl.h"
+#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_delegate.h"
#include "content/browser/loader/resource_dispatcher_host_impl.h"
@@ -100,6 +102,7 @@ NavigationHandleImpl::NavigationHandleImpl(
is_download_(false),
is_stream_(false),
started_from_context_menu_(started_from_context_menu),
+ reload_type_(ReloadType::NONE),
weak_factory_(this) {
DCHECK(!navigation_start.is_null());
redirect_chain_.push_back(url);
@@ -107,6 +110,23 @@ NavigationHandleImpl::NavigationHandleImpl(
starting_site_instance_ =
frame_tree_node_->current_frame_host()->GetSiteInstance();
+ if (pending_nav_entry_id_) {
+ NavigationControllerImpl* nav_controller =
+ static_cast<NavigationControllerImpl*>(
+ frame_tree_node_->navigator()->GetController());
+ NavigationEntryImpl* nav_entry =
+ nav_controller->GetEntryWithUniqueID(pending_nav_entry_id_);
+ if (!nav_entry &&
+ nav_controller->GetPendingEntry() &&
+ nav_controller->GetPendingEntry()->GetUniqueID() ==
+ pending_nav_entry_id_) {
+ nav_entry = nav_controller->GetPendingEntry();
+ }
+
+ if (nav_entry)
+ reload_type_ = nav_entry->reload_type();
+ }
+
if (!IsRendererDebugURL(url_))
GetDelegate()->DidStartNavigation(this);
@@ -396,6 +416,10 @@ const std::string& NavigationHandleImpl::GetSearchableFormEncoding() {
return searchable_form_encoding_;
}
+ReloadType NavigationHandleImpl::GetReloadType() {
+ return reload_type_;
+}
+
NavigationData* NavigationHandleImpl::GetNavigationData() {
return navigation_data_.get();
}
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.h ('k') | content/public/browser/navigation_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698