OOPIF: History navigations for new child frames.

When a subframe is created during a history navigation, we now make an
OpenURL call to the browser process that looks up which
FrameNavigationEntry matches the new frame (based on Blink's unique name
approach).  If no matching entry is found, we will fall back to the
original URL for the frame.

BUG=502317
TEST=See bug for repro steps.

Review URL: https://codereview.chromium.org/1422333009

Cr-Commit-Position: refs/heads/master@{#362579}
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index e972282..374e09d 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -450,8 +450,7 @@
                          bool should_replace_current_entry) override;
   blink::WebNavigationPolicy decidePolicyForNavigation(
       const NavigationPolicyInfo& info) override;
-  blink::WebHistoryItem historyItemForNewChildFrame(
-      blink::WebFrame* frame) override;
+  blink::WebHistoryItem historyItemForNewChildFrame() override;
   void willSendSubmitEvent(blink::WebLocalFrame* frame,
                            const blink::WebFormElement& form) override;
   void willSubmitForm(blink::WebLocalFrame* frame,
@@ -772,10 +771,15 @@
       std::vector<base::FilePath> equivalent_local_paths,
       base::FilePath local_directory_path);
 
+  // Requests that the browser process navigates to |url|. If
+  // |is_history_navigation_in_new_child| is true, the browser process should
+  // look for a matching FrameNavigationEntry in the last committed entry to use
+  // instead of |url|.
   void OpenURL(const GURL& url,
                const Referrer& referrer,
                blink::WebNavigationPolicy policy,
-               bool should_replace_current_entry);
+               bool should_replace_current_entry,
+               bool is_history_navigation_in_new_child);
 
   // Performs a navigation in the frame. This provides a unified function for
   // the current code path and the browser-side navigation path (in