This is only the first part of the refactoring. The old method was preserved
and not all call points were changed.

The second part will deal with factoring out the old OpenURL method.

Overall purpose: speed up calls, make it more flexible to plumb parameters to
the call chain, reduce code repetition.

It is necessary to add one more parameter (namely, override_encoding) to
OpenURL in order to be able to restore the page encoding upon loading the
contents. For solving this issue, it is necessary for the encoding to be
restored from the BookmarkModel.

BUG=2926

Review URL: http://codereview.chromium.org/7388007

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95013 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents_delegate.h b/content/browser/tab_contents/tab_contents_delegate.h
index af2056ed..75214cc7 100644
--- a/content/browser/tab_contents/tab_contents_delegate.h
+++ b/content/browser/tab_contents/tab_contents_delegate.h
@@ -32,6 +32,7 @@
 }
 
 struct ContextMenuParams;
+struct OpenURLParams;
 class DownloadItem;
 class GURL;
 class HtmlDialogUIDelegate;
@@ -51,15 +52,20 @@
   //
   // A NULL source indicates the current tab (callers should probably use
   // OpenURL() for these cases which does it for you).
-  //
+
   // Returns the TabContents the URL is opened in, or NULL if the URL wasn't
   // opened immediately.
+  // Deprecated. Please use the two-arguments method instead.
+  // TODO(adriansc): Remove this method once refactoring changed all call sites.
   virtual TabContents* OpenURLFromTab(TabContents* source,
                                       const GURL& url,
                                       const GURL& referrer,
                                       WindowOpenDisposition disposition,
                                       PageTransition::Type transition);
 
+  virtual TabContents* OpenURLFromTab(TabContents* source,
+                                      const OpenURLParams& params);
+
   // Called to inform the delegate that the tab content's navigation state
   // changed. The |changed_flags| indicates the parts of the navigation state
   // that have been updated, and is any combination of the