Navigation: Separate same document navigation DidCommit path.

This patch aims to split the currently unique path for same document and
cross document navigation DidCommit. We introduce a new FrameHost
interface method DidCommitSameDocumentNavigation while preserving the
existing DidCommitProvisionalLoad IPC. Same document navigation will use
the new mojo interface method while cross document navigation will keep
on using DidCommitProvisionalLoad.

This change is part of the broader goal of providing a clear mojo
interface for renderer/RFH navigation communication. It would solve
a number of complex race conditions. This specific change helps the
Browser process classify navigations as a same document. This is a step
forward unifying browser and renderer initiated same document navigation
code paths.

Bug:784904

Change-Id: Ie937ece170643ec2aa651c763df27fae3c150ac2
Reviewed-on: https://chromium-review.googlesource.com/789857
Commit-Queue: Arthur Hemery <[email protected]>
Reviewed-by: Camille Lamy <[email protected]>
Reviewed-by: Balazs Engedy <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#534392}
diff --git a/content/browser/frame_host/navigator_impl.h b/content/browser/frame_host/navigator_impl.h
index adcf0d3..8b08310 100644
--- a/content/browser/frame_host/navigator_impl.h
+++ b/content/browser/frame_host/navigator_impl.h
@@ -53,10 +53,10 @@
                             const GURL& url,
                             int error_code,
                             const base::string16& error_description) override;
-  void DidNavigate(
-      RenderFrameHostImpl* render_frame_host,
-      const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
-      std::unique_ptr<NavigationHandleImpl> navigation_handle) override;
+  void DidNavigate(RenderFrameHostImpl* render_frame_host,
+                   const FrameHostMsg_DidCommitProvisionalLoad_Params& params,
+                   std::unique_ptr<NavigationHandleImpl> navigation_handle,
+                   bool was_within_same_document) override;
   bool NavigateToPendingEntry(FrameTreeNode* frame_tree_node,
                               const FrameNavigationEntry& frame_entry,
                               ReloadType reload_type,