Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents().

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115800 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 327f407..d89b717 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1590,6 +1590,10 @@
   return this;
 }
 
+WebContents* TabContents::GetAsWebContents() {
+  return this;
+}
+
 content::ViewType TabContents::GetRenderViewType() const {
   return view_type_;
 }
diff --git a/content/browser/tab_contents/tab_contents.h b/content/browser/tab_contents/tab_contents.h
index 04bc8fc285..892c62d 100644
--- a/content/browser/tab_contents/tab_contents.h
+++ b/content/browser/tab_contents/tab_contents.h
@@ -234,6 +234,7 @@
   virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
   virtual const GURL& GetURL() const OVERRIDE;
   virtual TabContents* GetAsTabContents() OVERRIDE;
+  virtual WebContents* GetAsWebContents() OVERRIDE;
   virtual content::ViewType GetRenderViewType() const OVERRIDE;
   virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE;
   virtual void RenderViewReady(RenderViewHost* render_view_host) OVERRIDE;