Move the PageNavigator interface and GlobalRequestID struct to content\public and put them in the content namespace. Make PageNavigator use WebContents instead of TabContents. While I'm touching all the callers, I've removed the deprecated PageNavigator function and converted users to the new one.

BUG=98716
TBR=joi
Review URL: http://codereview.chromium.org/8991012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115858 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 3330a24c..bc17945d 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -111,6 +111,8 @@
 using content::DevToolsManagerImpl;
 using content::DownloadItem;
 using content::DownloadManager;
+using content::GlobalRequestID;
+using content::OpenURLParams;
 using content::SSLStatus;
 using content::UserMetricsAction;
 using content::WebContents;
@@ -762,27 +764,16 @@
     delegate_->WebUISend(this, source_url, name, args);
 }
 
-// TODO(adriansc): Remove this method once refactoring changed all call sites.
-TabContents* TabContents::OpenURL(const GURL& url,
-                                  const GURL& referrer,
-                                  WindowOpenDisposition disposition,
-                                  content::PageTransition transition) {
-  // For specifying a referrer, use the version of OpenURL taking OpenURLParams.
-  DCHECK(referrer.is_empty());
-  return OpenURL(OpenURLParams(url, content::Referrer(), disposition,
-                               transition, false));
-}
+WebContents* TabContents::OpenURL(const OpenURLParams& params) {
+  if (!delegate_)
+    return NULL;
 
-TabContents* TabContents::OpenURL(const OpenURLParams& params) {
-  if (delegate_) {
-    TabContents* new_contents = delegate_->OpenURLFromTab(this, params);
-    // Notify observers.
-    FOR_EACH_OBSERVER(WebContentsObserver, observers_,
-                      DidOpenURL(params.url, params.referrer,
-                                 params.disposition, params.transition));
-    return new_contents;
-  }
-  return NULL;
+  WebContents* new_contents = delegate_->OpenURLFromTab(this, params);
+  // Notify observers.
+  FOR_EACH_OBSERVER(WebContentsObserver, observers_,
+                    DidOpenURL(params.url, params.referrer,
+                               params.disposition, params.transition));
+  return new_contents;
 }
 
 bool TabContents::NavigateToPendingEntry(
@@ -1921,7 +1912,7 @@
                                      WindowOpenDisposition disposition,
                                      int64 source_frame_id,
                                      const GlobalRequestID& old_request_id) {
-  TabContents* new_contents = NULL;
+  WebContents* new_contents = NULL;
   content::PageTransition transition_type = content::PAGE_TRANSITION_LINK;
   if (render_manager_.web_ui()) {
     // When we're a Web UI, it will provide a page transition type for us (this