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

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

Issue 251823002: Move didAccessInitialDocument to RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 8 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
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index ddda5a69832406cf1b7127088b9caf838f57e480..15e4844bd5c0c310f5d57e0220f8ac3e8f0a073c 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -288,6 +288,8 @@ bool RenderFrameHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnRunJavaScriptMessage)
IPC_MESSAGE_HANDLER_DELAY_REPLY(FrameHostMsg_RunBeforeUnloadConfirm,
OnRunBeforeUnloadConfirm)
+ IPC_MESSAGE_HANDLER(FrameHostMsg_DidAccessInitialDocument,
+ OnDidAccessInitialDocument)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_RequestPermission,
OnRequestDesktopNotificationPermission)
IPC_MESSAGE_HANDLER(DesktopNotificationHostMsg_Show,
@@ -437,10 +439,6 @@ void RenderFrameHostImpl::OnNavigate(const IPC::Message& msg) {
process->ReceivedBadMessage();
}
- // Now that something has committed, we don't need to track whether the
- // initial page has been accessed.
- render_view_host_->has_accessed_initial_document_ = false;
-
// Without this check, an evil renderer can trick the browser into creating
// a navigation entry for a banned URL. If the user clicks the back button
// followed by the forward button (or clicks reload, or round-trips through
@@ -678,6 +676,10 @@ void RenderFrameHostImpl::OnCancelDesktopNotification(int notification_id) {
cancel_notification_callbacks_.erase(notification_id);
}
+void RenderFrameHostImpl::OnDidAccessInitialDocument() {
+ delegate_->DidAccessInitialDocument();
+}
+
void RenderFrameHostImpl::SetPendingShutdown(const base::Closure& on_swap_out) {
render_view_host_->SetPendingShutdown(on_swap_out);
}
« no previous file with comments | « content/browser/frame_host/render_frame_host_impl.h ('k') | content/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698