TabContentsWrapper -> TabContents, part 33.

Loose files in browser/.

BUG=131026
TEST=no change


Review URL: https://chromiumcodereview.appspot.com/10538073

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141465 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index 779cd0c..9c47b3a4 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -9,7 +9,7 @@
 #include "chrome/browser/intranet_redirect_detector.h"
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/tab_contents/link_infobar_delegate.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/chrome_notification_types.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/notification_service.h"
@@ -141,7 +141,7 @@
     case chrome::NOTIFICATION_INSTANT_COMMITTED: {
       // See above.
       NavigationController* controller =
-          &content::Source<TabContentsWrapper>(source)->
+          &content::Source<TabContents>(source)->
               web_contents()->GetController();
       if (controller_ == controller) {
         delete this;
@@ -228,8 +228,8 @@
   }
 
   InfoBarTabHelper* infobar_helper =
-      TabContentsWrapper::GetCurrentWrapperForContents(
-          controller_->GetWebContents())->infobar_tab_helper();
+      TabContents::FromWebContents(controller_->GetWebContents())->
+          infobar_tab_helper();
   infobar_helper->AddInfoBar(
       new AlternateNavInfoBarDelegate(infobar_helper, alternate_nav_url_));
   delete this;
diff --git a/chrome/browser/app_controller_mac_browsertest.mm b/chrome/browser/app_controller_mac_browsertest.mm
index 4489f0708..956f7c79 100644
--- a/chrome/browser/app_controller_mac_browsertest.mm
+++ b/chrome/browser/app_controller_mac_browsertest.mm
@@ -68,7 +68,7 @@
   EXPECT_EQ(2u, BrowserList::size());
 
   Browser* browser = *(BrowserList::begin());
-  GURL current_url = browser->GetSelectedWebContents()->GetURL();
+  GURL current_url = browser->GetActiveWebContents()->GetURL();
   EXPECT_EQ(GetAppURL(), current_url.spec());
 }
 
diff --git a/chrome/browser/autocomplete_history_manager_unittest.cc b/chrome/browser/autocomplete_history_manager_unittest.cc
index 3e8e7d7..7b09f552 100644
--- a/chrome/browser/autocomplete_history_manager_unittest.cc
+++ b/chrome/browser/autocomplete_history_manager_unittest.cc
@@ -9,7 +9,7 @@
 #include "base/utf_string_conversions.h"
 #include "chrome/browser/autocomplete_history_manager.h"
 #include "chrome/browser/autofill/test_autofill_external_delegate.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/browser/webdata/web_data_service.h"
 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
 #include "chrome/test/base/testing_browser_process.h"
@@ -145,8 +145,8 @@
 
 class MockAutofillExternalDelegate : public TestAutofillExternalDelegate {
  public:
-  explicit MockAutofillExternalDelegate(TabContentsWrapper* wrapper)
-      : TestAutofillExternalDelegate(wrapper, NULL) {}
+  explicit MockAutofillExternalDelegate(TabContents* tab_contents)
+      : TestAutofillExternalDelegate(tab_contents, NULL) {}
   virtual ~MockAutofillExternalDelegate() {}
 
   virtual void ApplyAutofillSuggestions(
@@ -187,7 +187,7 @@
       &profile_, web_data_service_);
 
   MockAutofillExternalDelegate external_delegate(
-      TabContentsWrapper::GetCurrentWrapperForContents(contents()));
+      TabContents::FromWebContents(contents()));
   EXPECT_CALL(external_delegate, OnSuggestionsReturned(_, _,  _,  _,  _));
   autocomplete_history_manager.SetExternalDelegate(&external_delegate);
 
diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc
index cbba9a8..54c53e87 100644
--- a/chrome/browser/browser_commands_unittest.cc
+++ b/chrome/browser/browser_commands_unittest.cc
@@ -166,13 +166,13 @@
   CommitPendingLoad(&second->GetController());
   browser()->GoBack(NEW_FOREGROUND_TAB);
   ASSERT_EQ(3, browser()->active_index());
-  ASSERT_EQ(url1, browser()->GetSelectedWebContents()->GetURL());
+  ASSERT_EQ(url1, browser()->GetActiveWebContents()->GetURL());
 
   // Same thing again for forward.
   // TODO(brettw) bug 11055: see the comment above about why we need this.
-  CommitPendingLoad(&browser()->GetSelectedWebContents()->GetController());
+  CommitPendingLoad(&browser()->GetActiveWebContents()->GetController());
   browser()->GoForward(NEW_FOREGROUND_TAB);
   ASSERT_EQ(4, browser()->active_index());
-  ASSERT_EQ(url2, browser()->GetSelectedWebContents()->GetURL());
+  ASSERT_EQ(url2, browser()->GetActiveWebContents()->GetURL());
 }
 
diff --git a/chrome/browser/browser_encoding_browsertest.cc b/chrome/browser/browser_encoding_browsertest.cc
index 1b68a9f..f868a82 100644
--- a/chrome/browser/browser_encoding_browsertest.cc
+++ b/chrome/browser/browser_encoding_browsertest.cc
@@ -42,7 +42,7 @@
     ui_test_utils::WindowedNotificationObserver observer(
         content::NOTIFICATION_SAVE_PACKAGE_SUCCESSFULLY_FINISHED,
         content::NotificationService::AllSources());
-    browser()->GetSelectedWebContents()->SavePage(
+    browser()->GetActiveWebContents()->SavePage(
         full_file_name, temp_sub_resource_dir_,
         content::SAVE_PAGE_TYPE_AS_COMPLETE_HTML);
     observer.Wait();
@@ -138,7 +138,7 @@
         ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
 
     EXPECT_EQ(kEncodingTestDatas[i].encoding_name,
-              browser()->GetSelectedWebContents()->GetEncoding());
+              browser()->GetActiveWebContents()->GetEncoding());
     browser()->CloseTab();
   }
 }
@@ -154,7 +154,7 @@
   test_dir_path = test_dir_path.AppendASCII(kTestFileName);
   GURL url = URLRequestMockHTTPJob::GetMockUrl(test_dir_path);
   ui_test_utils::NavigateToURL(browser(), url);
-  content::WebContents* web_contents = browser()->GetSelectedWebContents();
+  content::WebContents* web_contents = browser()->GetActiveWebContents();
   EXPECT_EQ("ISO-8859-1", web_contents->GetEncoding());
 
   // Override the encoding to "gb18030".
@@ -258,7 +258,7 @@
   browser()->profile()->GetPrefs()->SetString(prefs::kDefaultCharset,
                                               "ISO-8859-4");
 
-  content::WebContents* web_contents = browser()->GetSelectedWebContents();
+  content::WebContents* web_contents = browser()->GetActiveWebContents();
   for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestDatas); ++i) {
     // Disable auto detect if it is on.
     browser()->profile()->GetPrefs()->SetBoolean(
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 20a9147..c5d6c55 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -14,7 +14,7 @@
 #include "base/utf_string_conversions.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_window.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
 #include "chrome/browser/ui/view_ids.h"
 #include "chrome/common/chrome_notification_types.h"
@@ -391,7 +391,7 @@
   ui_test_utils::NavigateToURL(browser(), url);
 
   browser()->Find();
-  ui_test_utils::FindInPage(browser()->GetSelectedTabContentsWrapper(),
+  ui_test_utils::FindInPage(browser()->GetActiveTabContents(),
                             ASCIIToUTF16("a"), true, false, NULL);
   ASSERT_TRUE(IsViewFocused(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD));
 
@@ -462,7 +462,7 @@
   focused_browser->window()->Activate();
 
   ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
-      unfocused_browser->GetSelectedWebContents()->GetRenderViewHost(), L"",
+      unfocused_browser->GetActiveWebContents()->GetRenderViewHost(), L"",
       L"stealFocus();"));
 
   // Make sure the first browser is still active.
@@ -481,7 +481,7 @@
   browser()->FocusLocationBar();
 
   ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
-      browser()->GetSelectedWebContents()->GetRenderViewHost(), L"",
+      browser()->GetActiveWebContents()->GetRenderViewHost(), L"",
       L"stealFocus();"));
 
   // Make sure the location bar is still focused.
@@ -527,7 +527,7 @@
       // Let's make sure the focus is on the expected element in the page.
       std::string actual;
       ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
-          browser()->GetSelectedWebContents()->GetRenderViewHost(),
+          browser()->GetActiveWebContents()->GetRenderViewHost(),
           L"",
           L"window.domAutomationController.send(getFocusedElement());",
           &actual));
@@ -544,7 +544,7 @@
             browser(), ui::VKEY_TAB, false, false, false, false,
             content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
             content::NotificationSource(content::Source<RenderViewHost>(
-                browser()->GetSelectedWebContents()->GetRenderViewHost())),
+                browser()->GetActiveWebContents()->GetRenderViewHost())),
             details));
       } else {
         // On the last tab key press, the focus returns to the browser.
@@ -587,7 +587,7 @@
             browser(), ui::VKEY_TAB, false, true, false, false,
             content::NOTIFICATION_FOCUS_CHANGED_IN_PAGE,
             content::NotificationSource(content::Source<RenderViewHost>(
-                browser()->GetSelectedWebContents()->GetRenderViewHost())),
+                browser()->GetActiveWebContents()->GetRenderViewHost())),
             details));
       } else {
         // On the last tab key press, the focus returns to the browser.
@@ -600,7 +600,7 @@
       // Let's make sure the focus is on the expected element in the page.
       std::string actual;
       ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
-          browser()->GetSelectedWebContents()->GetRenderViewHost(),
+          browser()->GetActiveWebContents()->GetRenderViewHost(),
           L"",
           L"window.domAutomationController.send(getFocusedElement());",
           &actual));
@@ -628,7 +628,7 @@
 
   // Let's show an interstitial.
   TestInterstitialPage* interstitial_page =
-      new TestInterstitialPage(browser()->GetSelectedWebContents(),
+      new TestInterstitialPage(browser()->GetActiveWebContents(),
                                true, GURL("http://interstitial.com"));
   // Give some time for the interstitial to show.
   MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -748,12 +748,12 @@
 
   // Page should have focus.
   ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
-  EXPECT_TRUE(browser()->GetSelectedWebContents()->GetRenderViewHost()->
+  EXPECT_TRUE(browser()->GetActiveWebContents()->GetRenderViewHost()->
               GetView()->HasFocus());
 
   // Let's show an interstitial.
   TestInterstitialPage* interstitial_page =
-      new TestInterstitialPage(browser()->GetSelectedWebContents(),
+      new TestInterstitialPage(browser()->GetActiveWebContents(),
                                true, GURL("http://interstitial.com"));
   // Give some time for the interstitial to show.
   MessageLoop::current()->PostDelayedTask(FROM_HERE,
@@ -839,26 +839,26 @@
   // Open the history tab, focus should be on the tab contents.
   browser()->ShowHistoryTab();
   ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
-      browser()->GetSelectedWebContents()));
+      browser()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
 
   // Open the new tab, focus should be on the location bar.
   browser()->NewTab();
   ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
-      browser()->GetSelectedWebContents()));
+      browser()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(location_bar_focus_view_id_));
 
   // Open the download tab, focus should be on the tab contents.
   browser()->ShowDownloadsTab();
   ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
-      browser()->GetSelectedWebContents()));
+      browser()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
 
   // Open about:blank, focus should be on the location bar.
   browser()->AddSelectedTabWithURL(GURL(chrome::kAboutBlankURL),
                                    content::PAGE_TRANSITION_LINK);
   ASSERT_NO_FATAL_FAILURE(ui_test_utils::WaitForLoadStop(
-      browser()->GetSelectedWebContents()));
+      browser()->GetActiveWebContents()));
   EXPECT_TRUE(IsViewFocused(location_bar_focus_view_id_));
 }
 
@@ -881,8 +881,7 @@
     ui_test_utils::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-                GetController()));
+            &browser()->GetActiveWebContents()->GetController()));
     browser()->Reload(CURRENT_TAB);
     observer.Wait();
   }
@@ -897,8 +896,7 @@
     ui_test_utils::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-                GetController()));
+            &browser()->GetActiveWebContents()->GetController()));
     browser()->Reload(CURRENT_TAB);
     observer.Wait();
   }
@@ -915,13 +913,12 @@
 
   // Open a regular page, crash, reload.
   ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(kSimplePage));
-  ui_test_utils::CrashTab(browser()->GetSelectedWebContents());
+  ui_test_utils::CrashTab(browser()->GetActiveWebContents());
   {
     ui_test_utils::WindowedNotificationObserver observer(
         content::NOTIFICATION_LOAD_STOP,
         content::Source<NavigationController>(
-            &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-                GetController()));
+            &browser()->GetActiveWebContents()->GetController()));
     browser()->Reload(CURRENT_TAB);
     observer.Wait();
   }
diff --git a/chrome/browser/chrome_browser_application_mac.mm b/chrome/browser/chrome_browser_application_mac.mm
index f4de295..baed0bb 100644
--- a/chrome/browser/chrome_browser_application_mac.mm
+++ b/chrome/browser/chrome_browser_application_mac.mm
@@ -12,8 +12,8 @@
 #import "base/metrics/histogram.h"
 #import "base/sys_string_conversions.h"
 #import "chrome/browser/app_controller_mac.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
 #import "chrome/common/mac/objc_method_swizzle.h"
 #import "chrome/common/mac/objc_zombie.h"
 #include "content/public/browser/browser_accessibility_state.h"
@@ -502,7 +502,7 @@
     for (TabContentsIterator it;
          !it.done();
          ++it) {
-      if (TabContentsWrapper* contents = *it) {
+      if (TabContents* contents = *it) {
         if (content::RenderViewHost* rvh =
                 contents->web_contents()->GetRenderViewHost()) {
           rvh->EnableFullAccessibilityMode();
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index 9cc0a799..d7e8cdd 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -68,7 +68,7 @@
 #include "chrome/browser/toolkit_extra_parts.h"
 #include "chrome/browser/ui/media_stream_infobar_delegate.h"
 #include "chrome/browser/ui/tab_contents/chrome_web_contents_view_delegate.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/browser/ui/webui/chrome_web_ui_controller_factory.h"
 #include "chrome/browser/user_style_sheet_watcher.h"
 #include "chrome/browser/user_style_sheet_watcher_factory.h"
@@ -1078,16 +1078,15 @@
     }
   }
 
-  TabContentsWrapper* wrapper =
-      TabContentsWrapper::GetCurrentWrapperForContents(tab);
-  if (!wrapper) {
-    // If there is no TabContentsWrapper for the given WebContents then we can't
+  TabContents* tab_contents = TabContents::FromWebContents(tab);
+  if (!tab_contents) {
+    // If there is no TabContents for the given WebContents then we can't
     // show the user a dialog to select a client certificate. So we simply
     // proceed with no client certificate.
     callback.Run(NULL);
     return;
   }
-  wrapper->ssl_helper()->ShowClientCertificateRequestDialog(
+  tab_contents->ssl_helper()->ShowClientCertificateRequestDialog(
       network_session, cert_request_info, callback);
 }
 
@@ -1114,8 +1113,7 @@
     return;
   }
 
-  TabContentsWrapper* tab =
-      TabContentsWrapper::GetCurrentWrapperForContents(contents);
+  TabContents* tab = TabContents::FromWebContents(contents);
   DCHECK(tab);
 
   InfoBarTabHelper* infobar_helper = tab->infobar_tab_helper();
diff --git a/chrome/browser/chrome_main_browsertest.cc b/chrome/browser/chrome_main_browsertest.cc
index d54965c..5d5244e6 100644
--- a/chrome/browser/chrome_main_browsertest.cc
+++ b/chrome/browser/chrome_main_browsertest.cc
@@ -55,7 +55,7 @@
   observer.Wait();
 
   GURL url = net::FilePathToFileURL(test_file_path);
-  content::WebContents* tab = browser()->GetSelectedWebContents();
+  content::WebContents* tab = browser()->GetActiveWebContents();
   ASSERT_EQ(url, tab->GetController().GetActiveEntry()->GetVirtualURL());
 }
 
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index 1586340..884f110 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -13,7 +13,7 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
 #include "chrome/browser/tab_contents/tab_util.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/pref_names.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/navigation_details.h"
@@ -144,12 +144,11 @@
     return;
   }
 
-  TabContentsWrapper* wrapper =
-      TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
-  InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper();
+  TabContents* tab_contents = TabContents::FromWebContents(web_contents);
+  InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper();
   infobar_helper->AddInfoBar(new RequestQuotaInfoBarDelegate(
       infobar_helper, this, origin_url, requested_quota,
-      wrapper->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages),
+      tab_contents->profile()->GetPrefs()->GetString(prefs::kAcceptLanguages),
       callback));
 }
 
diff --git a/chrome/browser/chrome_switches_browsertest.cc b/chrome/browser/chrome_switches_browsertest.cc
index 9e2ff0a..28aeafc7 100644
--- a/chrome/browser/chrome_switches_browsertest.cc
+++ b/chrome/browser/chrome_switches_browsertest.cc
@@ -40,7 +40,7 @@
 
   std::string html;
   EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractString(
-      browser()->GetSelectedWebContents()->GetRenderViewHost(),
+      browser()->GetActiveWebContents()->GetRenderViewHost(),
       L"",
       L"window.domAutomationController.send(document.body.outerHTML);",
       &html));
diff --git a/chrome/browser/chrome_to_mobile_service.cc b/chrome/browser/chrome_to_mobile_service.cc
index 287780c..433d04f 100644
--- a/chrome/browser/chrome_to_mobile_service.cc
+++ b/chrome/browser/chrome_to_mobile_service.cc
@@ -245,7 +245,7 @@
   RequestData data;
   data.mobile_id = mobile_id;
   content::WebContents* web_contents =
-      browser::FindLastActiveWithProfile(profile_)->GetSelectedWebContents();
+      browser::FindLastActiveWithProfile(profile_)->GetActiveWebContents();
   data.url = web_contents->GetURL();
   data.title = web_contents->GetTitle();
   data.snapshot_path = snapshot;
@@ -332,9 +332,9 @@
   snapshots_.insert(path);
 
   Browser* browser = browser::FindLastActiveWithProfile(profile_);
-  if (success && browser && browser->GetSelectedWebContents()) {
+  if (success && browser && browser->GetActiveWebContents()) {
     // Generate the snapshot and have the observer be called back on completion.
-    browser->GetSelectedWebContents()->GenerateMHTML(path,
+    browser->GetActiveWebContents()->GenerateMHTML(path,
         base::Bind(&Observer::SnapshotGenerated, observer));
   } else if (observer.get()) {
     // Signal snapshot generation failure.
diff --git a/chrome/browser/collected_cookies_browsertest.cc b/chrome/browser/collected_cookies_browsertest.cc
index 82f2ba2..5bc55b33 100644
--- a/chrome/browser/collected_cookies_browsertest.cc
+++ b/chrome/browser/collected_cookies_browsertest.cc
@@ -8,7 +8,7 @@
 #include "chrome/browser/content_settings/cookie_settings.h"
 #include "chrome/browser/net/url_fixer_upper.h"
 #include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
@@ -35,7 +35,7 @@
       browser(), test_server()->GetURL("files/cookie1.html"));
 
   // Click on the info link twice.
-  TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
+  TabContents* tab_contents = browser()->GetActiveTabContents();
   browser()->ShowCollectedCookiesDialog(tab_contents);
   browser()->ShowCollectedCookiesDialog(tab_contents);
 }
@@ -52,7 +52,7 @@
       browser(), test_server()->GetURL("files/cookie1.html"));
 
   // Click on the info link.
-  TabContentsWrapper* tab_contents = browser()->GetSelectedTabContentsWrapper();
+  TabContents* tab_contents = browser()->GetActiveTabContents();
   browser()->ShowCollectedCookiesDialog(tab_contents);
 
   // Navigate to another page.
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index 025ae9c..c484353 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/file_path.h"
 #include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
@@ -52,8 +52,7 @@
   ui_test_utils::WindowedNotificationObserver observer(
       content::NOTIFICATION_LOAD_STOP,
       content::Source<NavigationController>(
-          &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-              GetController()));
+          &browser()->GetActiveWebContents()->GetController()));
   browser()->Reload(CURRENT_TAB);
   observer.Wait();
   ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
@@ -82,8 +81,7 @@
   ui_test_utils::WindowedNotificationObserver observer(
       content::NOTIFICATION_LOAD_STOP,
       content::Source<NavigationController>(
-          &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-              GetController()));
+          &browser()->GetActiveWebContents()->GetController()));
   browser()->Reload(CURRENT_TAB);
   observer.Wait();
   ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index e69f4a4..ff634eec 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -6,7 +6,7 @@
 #include "base/utf_string_conversions.h"
 #include "chrome/browser/net/url_request_mock_util.h"
 #include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
 #include "content/public/browser/web_contents.h"
@@ -38,7 +38,7 @@
                                     const std::string& expected_title,
                                     int num_navigations) {
     ui_test_utils::TitleWatcher title_watcher(
-        browser()->GetSelectedWebContents(),
+        browser()->GetActiveWebContents(),
         ASCIIToUTF16(expected_title));
 
     ui_test_utils::NavigateToURLBlockUntilNavigationsComplete(
@@ -84,13 +84,12 @@
                                       int num_navigations,
                                       HistoryNavigationDirection direction) {
     ui_test_utils::TitleWatcher title_watcher(
-        browser()->GetSelectedWebContents(),
+        browser()->GetActiveWebContents(),
         ASCIIToUTF16(expected_title));
 
     content::TestNavigationObserver test_navigation_observer(
         content::Source<NavigationController>(
-              &browser()->GetSelectedTabContentsWrapper()->web_contents()->
-                  GetController()),
+              &browser()->GetActiveWebContents()->GetController()),
         NULL,
         num_navigations);
     if (direction == HISTORY_NAVIGATE_BACK) {
diff --git a/chrome/browser/external_extension_browsertest.cc b/chrome/browser/external_extension_browsertest.cc
index 4b5959c04..b377e1f 100644
--- a/chrome/browser/external_extension_browsertest.cc
+++ b/chrome/browser/external_extension_browsertest.cc
@@ -59,7 +59,7 @@
         ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);
 
     // Bundle up information needed to verify the result.
-    content::WebContents* tab = browser->GetSelectedWebContents();
+    content::WebContents* tab = browser->GetActiveWebContents();
     return IsSearchProviderTestData(tab, host, test_url);
   }
 
diff --git a/chrome/browser/iframe_browsertest.cc b/chrome/browser/iframe_browsertest.cc
index 0db88c8..f742e15 100644
--- a/chrome/browser/iframe_browsertest.cc
+++ b/chrome/browser/iframe_browsertest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -18,7 +18,7 @@
 
     ui_test_utils::NavigateToURL(browser(), url);
     EXPECT_EQ(ASCIIToUTF16(page_title),
-              browser()->GetSelectedWebContents()->GetTitle());
+              browser()->GetActiveWebContents()->GetTitle());
   }
 };
 
diff --git a/chrome/browser/loadtimes_extension_bindings_browsertest.cc b/chrome/browser/loadtimes_extension_bindings_browsertest.cc
index 4e6961a..28b711be 100644
--- a/chrome/browser/loadtimes_extension_bindings_browsertest.cc
+++ b/chrome/browser/loadtimes_extension_bindings_browsertest.cc
@@ -19,7 +19,7 @@
     // before we read them. We ought to test that too. Until the race is fixed,
     // zero it out so the test is stable.
     content::RenderViewHost* rvh =
-        browser()->GetSelectedWebContents()->GetRenderViewHost();
+        browser()->GetActiveWebContents()->GetRenderViewHost();
     ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
         rvh, L"",
         L"window.before.firstPaintAfterLoadTime = 0;"
@@ -45,7 +45,7 @@
   GURL plain_url = test_server()->GetURL("blank");
   ui_test_utils::NavigateToURL(browser(), plain_url);
   content::RenderViewHost* rvh =
-      browser()->GetSelectedWebContents()->GetRenderViewHost();
+      browser()->GetActiveWebContents()->GetRenderViewHost();
   ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
       rvh, L"", L"window.before = window.chrome.loadTimes()"));
   ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
@@ -62,7 +62,7 @@
   GURL hash_url(plain_url.spec() + "#");
   ui_test_utils::NavigateToURL(browser(), plain_url);
   content::RenderViewHost* rvh =
-      browser()->GetSelectedWebContents()->GetRenderViewHost();
+      browser()->GetActiveWebContents()->GetRenderViewHost();
   ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
       rvh, L"", L"window.before = window.chrome.loadTimes()"));
   ui_test_utils::NavigateToURL(browser(), hash_url);
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index 72bd7c5..5269e303d5 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -24,7 +24,7 @@
 #include "chrome/browser/ui/browser_window.h"
 #include "chrome/browser/ui/omnibox/location_bar.h"
 #include "chrome/browser/ui/omnibox/omnibox_view.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/chrome_notification_types.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/pref_names.h"
@@ -155,7 +155,7 @@
 
 // OmniboxSearchHint ----------------------------------------------------------
 
-OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
+OmniboxSearchHint::OmniboxSearchHint(TabContents* tab) : tab_(tab) {
   NavigationController* controller = &(tab->web_contents()->GetController());
   notification_registrar_.Add(
       this,
diff --git a/chrome/browser/omnibox_search_hint.h b/chrome/browser/omnibox_search_hint.h
index 859edf97..04c9458 100644
--- a/chrome/browser/omnibox_search_hint.h
+++ b/chrome/browser/omnibox_search_hint.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -15,7 +15,6 @@
 
 class Profile;
 class TabContents;
-typedef TabContents TabContentsWrapper;
 
 // This class is responsible for showing an info-bar that tells the user she
 // can type her search query directly in the omnibox.
@@ -24,7 +23,7 @@
 // info-bar.
 class OmniboxSearchHint : public content::NotificationObserver {
  public:
-  explicit OmniboxSearchHint(TabContentsWrapper* tab);
+  explicit OmniboxSearchHint(TabContents* tab);
   virtual ~OmniboxSearchHint();
 
   // content::NotificationObserver method:
@@ -36,7 +35,7 @@
   // queries can be typed directly in there.
   void ShowEnteringQuery();
 
-  TabContentsWrapper* tab() { return tab_; }
+  TabContents* tab() { return tab_; }
 
   // Disables the hint infobar permanently, so that it does not show ever again.
   void DisableHint();
@@ -51,7 +50,7 @@
   content::NotificationRegistrar notification_registrar_;
 
   // The tab we are associated with.
-  TabContentsWrapper* tab_;
+  TabContents* tab_;
 
   // A map containing the URLs of the search engine for which we want to
   // trigger the hint.
diff --git a/chrome/browser/plugin_infobar_delegates.cc b/chrome/browser/plugin_infobar_delegates.cc
index 59bf3a3..ebb3cd73 100644
--- a/chrome/browser/plugin_infobar_delegates.cc
+++ b/chrome/browser/plugin_infobar_delegates.cc
@@ -9,7 +9,7 @@
 #include "chrome/browser/google/google_util.h"
 #include "chrome/browser/infobars/infobar_tab_helper.h"
 #include "chrome/browser/plugin_observer.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/render_messages.h"
 #include "chrome/common/url_constants.h"
 #include "content/public/browser/render_view_host.h"
@@ -168,7 +168,7 @@
     PluginInstaller* installer,
     const string16& message)
     : PluginInfoBarDelegate(
-        observer->tab_contents_wrapper()->infobar_tab_helper(),
+        observer->tab_contents()->infobar_tab_helper(),
         installer->name(),
         installer->identifier()),
       WeakPluginInstallerObserver(installer),
@@ -225,7 +225,7 @@
   if (installer()->url_for_display()) {
     installer()->OpenDownloadURL(web_contents);
   } else {
-    installer()->StartInstalling(observer_->tab_contents_wrapper());
+    installer()->StartInstalling(observer_->tab_contents());
   }
   return false;
 }
diff --git a/chrome/browser/plugin_infobar_delegates.h b/chrome/browser/plugin_infobar_delegates.h
index cb0a4b8..ab061c43 100644
--- a/chrome/browser/plugin_infobar_delegates.h
+++ b/chrome/browser/plugin_infobar_delegates.h
@@ -107,7 +107,7 @@
   // not have any buttons (and not call the callback).
   void ReplaceWithInfoBar(const string16& message);
 
-  // Has the same lifetime as TabContentsWrapper, which owns us
+  // Has the same lifetime as TabContents, which owns us
   // (transitively via InfoBarTabHelper).
   PluginObserver* observer_;
 
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc
index 7bb88490..0205b6010 100644
--- a/chrome/browser/plugin_installer.cc
+++ b/chrome/browser/plugin_installer.cc
@@ -14,7 +14,7 @@
 #include "chrome/browser/platform_util.h"
 #include "chrome/browser/plugin_installer_observer.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/download_id.h"
 #include "content/public/browser/download_item.h"
@@ -188,21 +188,21 @@
   weak_observers_.RemoveObserver(observer);
 }
 
-void PluginInstaller::StartInstalling(TabContentsWrapper* wrapper) {
+void PluginInstaller::StartInstalling(TabContents* tab_contents) {
   DCHECK_EQ(INSTALLER_STATE_IDLE, state_);
   DCHECK(!url_for_display_);
   state_ = INSTALLER_STATE_DOWNLOADING;
   FOR_EACH_OBSERVER(PluginInstallerObserver, observers_, DownloadStarted());
-  content::WebContents* web_contents = wrapper->web_contents();
+  content::WebContents* web_contents = tab_contents->web_contents();
   DownloadManager* download_manager =
-      BrowserContext::GetDownloadManager(wrapper->profile());
+      BrowserContext::GetDownloadManager(tab_contents->profile());
   download_util::RecordDownloadSource(
       download_util::INITIATED_BY_PLUGIN_INSTALLER);
   BrowserThread::PostTask(
       BrowserThread::IO, FROM_HERE,
       base::Bind(&BeginDownload,
                  plugin_url_,
-                 wrapper->profile()->GetResourceContext(),
+                 tab_contents->profile()->GetResourceContext(),
                  web_contents->GetRenderProcessHost()->GetID(),
                  web_contents->GetRenderViewHost()->GetRoutingID(),
                  base::Bind(&PluginInstaller::DownloadStarted,
diff --git a/chrome/browser/plugin_installer.h b/chrome/browser/plugin_installer.h
index 52fe9c3eb..4bc6507 100644
--- a/chrome/browser/plugin_installer.h
+++ b/chrome/browser/plugin_installer.h
@@ -17,7 +17,6 @@
 class FilePath;
 class PluginInstallerObserver;
 class TabContents;
-typedef TabContents TabContentsWrapper;
 class WeakPluginInstallerObserver;
 
 namespace content {
@@ -91,7 +90,7 @@
   // Starts downloading the download URL and opens the downloaded file
   // when finished. This method should only be called if |url_for_display|
   // returns false.
-  void StartInstalling(TabContentsWrapper* wrapper);
+  void StartInstalling(TabContents* tab_contents);
 
   // If |status_str| describes a valid security status, writes it to |status|
   // and returns true, else returns false and leaves |status| unchanged.
diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc
index 5497c5c..5b82ddd 100644
--- a/chrome/browser/plugin_observer.cc
+++ b/chrome/browser/plugin_observer.cc
@@ -17,7 +17,7 @@
 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h"
 #include "chrome/browser/ui/browser_dialogs.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/render_messages.h"
 #include "chrome/common/url_constants.h"
 #include "content/public/browser/plugin_service.h"
@@ -51,7 +51,7 @@
 class ConfirmInstallDialogDelegate : public TabModalConfirmDialogDelegate,
                                      public WeakPluginInstallerObserver {
  public:
-  ConfirmInstallDialogDelegate(TabContentsWrapper* wrapper,
+  ConfirmInstallDialogDelegate(TabContents* tab_contents,
                                PluginInstaller* installer);
 
   // TabModalConfirmDialogDelegate methods:
@@ -66,15 +66,15 @@
   virtual void OnlyWeakObserversLeft() OVERRIDE;
 
  private:
-  TabContentsWrapper* wrapper_;
+  TabContents* tab_contents_;
 };
 
 ConfirmInstallDialogDelegate::ConfirmInstallDialogDelegate(
-    TabContentsWrapper* wrapper,
+    TabContents* tab_contents,
     PluginInstaller* installer)
-    : TabModalConfirmDialogDelegate(wrapper->web_contents()),
+    : TabModalConfirmDialogDelegate(tab_contents->web_contents()),
       WeakPluginInstallerObserver(installer),
-      wrapper_(wrapper) {
+      tab_contents_(tab_contents) {
 }
 
 string16 ConfirmInstallDialogDelegate::GetTitle() {
@@ -93,7 +93,7 @@
 }
 
 void ConfirmInstallDialogDelegate::OnAccepted() {
-  installer()->StartInstalling(wrapper_);
+  installer()->StartInstalling(tab_contents_);
 }
 
 void ConfirmInstallDialogDelegate::OnCanceled() {
@@ -160,7 +160,7 @@
 };
 #endif  // defined(ENABLE_PLUGIN_INSTALLATION)
 
-PluginObserver::PluginObserver(TabContentsWrapper* tab_contents)
+PluginObserver::PluginObserver(TabContents* tab_contents)
     : content::WebContentsObserver(tab_contents->web_contents()),
       ALLOW_THIS_IN_INITIALIZER_LIST(weak_ptr_factory_(this)),
       tab_contents_(tab_contents) {
diff --git a/chrome/browser/plugin_observer.h b/chrome/browser/plugin_observer.h
index 70d4bab..c0d6ebf8 100644
--- a/chrome/browser/plugin_observer.h
+++ b/chrome/browser/plugin_observer.h
@@ -17,7 +17,6 @@
 class InfoBarDelegate;
 class PluginFinder;
 class TabContents;
-typedef TabContents TabContentsWrapper;
 
 #if defined(ENABLE_PLUGIN_INSTALLATION)
 class PluginInstaller;
@@ -26,7 +25,7 @@
 
 class PluginObserver : public content::WebContentsObserver {
  public:
-  explicit PluginObserver(TabContentsWrapper* tab_contents);
+  explicit PluginObserver(TabContents* tab_contents);
   virtual ~PluginObserver();
 
   // content::WebContentsObserver implementation.
@@ -37,7 +36,7 @@
   void InstallMissingPlugin(PluginInstaller* installer);
 #endif
 
-  TabContentsWrapper* tab_contents_wrapper() { return tab_contents_; }
+  TabContents* tab_contents() { return tab_contents_; }
 
  private:
   class PluginPlaceholderHost;
@@ -62,7 +61,7 @@
 
   base::WeakPtrFactory<PluginObserver> weak_ptr_factory_;
 
-  TabContentsWrapper* tab_contents_;
+  TabContents* tab_contents_;
 
 #if defined(ENABLE_PLUGIN_INSTALLATION)
   // Stores all PluginPlaceholderHosts, keyed by their routing ID.
diff --git a/chrome/browser/popup_blocker_browsertest.cc b/chrome/browser/popup_blocker_browsertest.cc
index 43db42d..a84b4e0 100644
--- a/chrome/browser/popup_blocker_browsertest.cc
+++ b/chrome/browser/popup_blocker_browsertest.cc
@@ -36,7 +36,7 @@
   // to the original URL.
   EXPECT_EQ(1u, browser::GetBrowserCount(browser()->profile()));
   EXPECT_EQ(1, browser()->tab_count());
-  WebContents* cur_tab = browser()->GetSelectedWebContents();
+  WebContents* cur_tab = browser()->GetActiveWebContents();
   ASSERT_TRUE(cur_tab);
   EXPECT_EQ(url, cur_tab->GetURL());
 }
diff --git a/chrome/browser/referrer_policy_browsertest.cc b/chrome/browser/referrer_policy_browsertest.cc
index 64d38d09..df69f97 100644
--- a/chrome/browser/referrer_policy_browsertest.cc
+++ b/chrome/browser/referrer_policy_browsertest.cc
@@ -9,7 +9,7 @@
 #include "chrome/browser/tab_contents/render_view_context_menu.h"
 #include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util.h"
 #include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/chrome_notification_types.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/ui_test_utils.h"
@@ -137,7 +137,7 @@
         content::NotificationService::AllSources());
 
     string16 expected_title = GetExpectedTitle(start_url, expected_referrer);
-    content::WebContents* tab = browser()->GetSelectedWebContents();
+    content::WebContents* tab = browser()->GetActiveWebContents();
     ui_test_utils::TitleWatcher title_watcher(tab, expected_title);
 
     // Watch for all possible outcomes to avoid timeouts if something breaks.
@@ -381,7 +381,7 @@
 
   string16 expected_title =
       GetExpectedTitle(start_url, EXPECT_ORIGIN_AS_REFERRER);
-  content::WebContents* tab = browser()->GetSelectedWebContents();
+  content::WebContents* tab = browser()->GetActiveWebContents();
   scoped_ptr<ui_test_utils::TitleWatcher> title_watcher(
       new ui_test_utils::TitleWatcher(tab, expected_title));
 
diff --git a/chrome/browser/repost_form_warning_browsertest.cc b/chrome/browser/repost_form_warning_browsertest.cc
index 97dc346..c5863c87 100644
--- a/chrome/browser/repost_form_warning_browsertest.cc
+++ b/chrome/browser/repost_form_warning_browsertest.cc
@@ -6,7 +6,7 @@
 #include "chrome/browser/net/url_fixer_upper.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/constrained_window_tab_helper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/chrome_notification_types.h"
 #include "chrome/common/url_constants.h"
 #include "chrome/test/base/in_process_browser_test.h"
@@ -32,15 +32,14 @@
       GURL("javascript:document.getElementById('form').submit()"));
 
   // Try to reload it twice, checking for repost.
-  content::WebContents* web_contents = browser()->GetSelectedWebContents();
+  content::WebContents* web_contents = browser()->GetActiveWebContents();
   web_contents->GetController().Reload(true);
   web_contents->GetController().Reload(true);
 
   // There should only be one dialog open.
-  TabContentsWrapper* wrapper =
-      TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
+  TabContents* tab_contents = TabContents::FromWebContents(web_contents);
   size_t num_constrained_windows =
-      wrapper->constrained_window_tab_helper()->constrained_window_count();
+      tab_contents->constrained_window_tab_helper()->constrained_window_count();
   EXPECT_EQ(1u, num_constrained_windows);
 
   // Navigate away from the page (this is when the test usually crashes).
@@ -48,7 +47,7 @@
 
   // The dialog should've been closed.
   num_constrained_windows =
-      wrapper->constrained_window_tab_helper()->constrained_window_count();
+      tab_contents->constrained_window_tab_helper()->constrained_window_count();
   EXPECT_EQ(0u, num_constrained_windows);
 }
 
@@ -65,7 +64,7 @@
       GURL("javascript:document.getElementById('form').submit()"));
 
   // Try to reload it, checking for repost.
-  content::WebContents* web_contents = browser()->GetSelectedWebContents();
+  content::WebContents* web_contents = browser()->GetActiveWebContents();
   web_contents->GetController().Reload(true);
 
   // Navigate to a page that requires authentication, bringing up another
diff --git a/chrome/browser/ssl_client_certificate_selector.h b/chrome/browser/ssl_client_certificate_selector.h
index e9e0a00..7487e2d 100644
--- a/chrome/browser/ssl_client_certificate_selector.h
+++ b/chrome/browser/ssl_client_certificate_selector.h
@@ -9,7 +9,6 @@
 #include "base/callback_forward.h"
 
 class TabContents;
-typedef TabContents TabContentsWrapper;
 
 namespace net {
 class HttpNetworkSession;
@@ -25,7 +24,7 @@
 // when the dialog closes in call cases; if the user cancels the dialog, we call
 // with a NULL certificate.
 void ShowSSLClientCertificateSelector(
-    TabContentsWrapper* wrapper,
+    TabContents* tab_contents,
     const net::HttpNetworkSession* network_session,
     net::SSLCertRequestInfo* cert_request_info,
     const base::Callback<void(net::X509Certificate*)>& callback);
diff --git a/chrome/browser/tab_restore_browsertest.cc b/chrome/browser/tab_restore_browsertest.cc
index 884edf0..83d422c 100644
--- a/chrome/browser/tab_restore_browsertest.cc
+++ b/chrome/browser/tab_restore_browsertest.cc
@@ -11,7 +11,7 @@
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/find_bar/find_notification_details.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
 #include "chrome/common/chrome_notification_types.h"
 #include "chrome/common/chrome_paths.h"
 #include "chrome/common/url_constants.h"
@@ -160,7 +160,7 @@
   // And make sure everything looks right.
   EXPECT_EQ(starting_tab_count + 1, browser()->tab_count());
   EXPECT_EQ(closed_tab_index, browser()->active_index());
-  EXPECT_EQ(url1_, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser()->GetActiveWebContents()->GetURL());
 }
 
 // Close a tab not at the end of the current window, then restore it. The tab
@@ -179,7 +179,7 @@
   // And make sure everything looks right.
   EXPECT_EQ(starting_tab_count + 3, browser()->tab_count());
   EXPECT_EQ(closed_tab_index, browser()->active_index());
-  EXPECT_EQ(url1_, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser()->GetActiveWebContents()->GetURL());
 }
 
 // Close a tab, switch windows, then restore the tab. The tab should be in its
@@ -205,7 +205,7 @@
   // And make sure everything looks right.
   EXPECT_EQ(starting_tab_count + 3, browser()->tab_count());
   EXPECT_EQ(closed_tab_index, browser()->active_index());
-  EXPECT_EQ(url1_, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser()->GetActiveWebContents()->GetURL());
 }
 
 // Close a tab, open a new window, close the first window, then restore the
@@ -233,7 +233,7 @@
 
   // Tab should be in a new window.
   Browser* browser = GetBrowser(1);
-  content::WebContents* web_contents = browser->GetSelectedWebContents();
+  content::WebContents* web_contents = browser->GetActiveWebContents();
   // And make sure the URLs matches.
   EXPECT_EQ(url2_, web_contents->GetURL());
   GoBack(browser);
@@ -293,7 +293,7 @@
   // Restore the closed tab.
   ASSERT_NO_FATAL_FAILURE(RestoreTab(1, closed_tab_index));
   EXPECT_EQ(starting_tab_count + 3, browser->tab_count());
-  EXPECT_EQ(url1_, browser->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser->GetActiveWebContents()->GetURL());
 }
 
 // Open a window with two tabs, close both (closing the window), then restore
@@ -329,12 +329,12 @@
   ASSERT_NO_FATAL_FAILURE(RestoreTab(1, 0));
   Browser* browser = GetBrowser(1);
   EXPECT_EQ(1, browser->tab_count());
-  EXPECT_EQ(url2_, browser->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url2_, browser->GetActiveWebContents()->GetURL());
 
   // Restore the next-to-last-closed tab into the same window.
   ASSERT_NO_FATAL_FAILURE(RestoreTab(1, 0));
   EXPECT_EQ(2, browser->tab_count());
-  EXPECT_EQ(url1_, browser->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser->GetActiveWebContents()->GetURL());
 }
 
 // Tests that a duplicate history entry is not created when we restore a page
@@ -377,9 +377,9 @@
   ASSERT_NO_FATAL_FAILURE(RestoreTab(0, tab_count - 1));
 
   // And make sure the URLs match.
-  EXPECT_EQ(http_url2, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(http_url2, browser()->GetActiveWebContents()->GetURL());
   GoBack(browser());
-  EXPECT_EQ(http_url1, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(http_url1, browser()->GetActiveWebContents()->GetURL());
 }
 
 // Tests that the SiteInstances used for entries in a restored tab's history
@@ -425,9 +425,9 @@
   ASSERT_NO_FATAL_FAILURE(RestoreTab(0, tab_count - 1));
 
   // And make sure the URLs match.
-  EXPECT_EQ(url1_, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(url1_, browser()->GetActiveWebContents()->GetURL());
   GoBack(browser());
-  EXPECT_EQ(http_url1, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(http_url1, browser()->GetActiveWebContents()->GetURL());
 
   // Navigating to a new URL should clear the forward list, because the max
   // page ID of the renderer should have been updated when we restored the tab.
@@ -435,7 +435,7 @@
       browser(), http_url2, CURRENT_TAB,
       ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
   EXPECT_FALSE(browser()->CanGoForward());
-  EXPECT_EQ(http_url2, browser()->GetSelectedWebContents()->GetURL());
+  EXPECT_EQ(http_url2, browser()->GetActiveWebContents()->GetURL());
 }
 
 IN_PROC_BROWSER_TEST_F(TabRestoreTest, RestoreWindow) {
@@ -501,7 +501,7 @@
 
   // Restore the closed tab.
   ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1));
-  TabContentsWrapper* tab = browser()->GetTabContentsWrapperAt(1);
+  TabContents* tab = browser()->GetTabContentsAt(1);
   EnsureTabFinishedRestoring(tab->web_contents());
 
   // See if content is as expected.
@@ -530,7 +530,7 @@
 
   // Restore the closed tab.
   ASSERT_NO_FATAL_FAILURE(RestoreTab(0, 1));
-  TabContentsWrapper* tab = browser()->GetTabContentsWrapperAt(1);
+  TabContents* tab = browser()->GetTabContentsAt(1);
   EnsureTabFinishedRestoring(tab->web_contents());
   ASSERT_EQ(http_url, tab->web_contents()->GetURL());
 
diff --git a/chrome/browser/unload_browsertest.cc b/chrome/browser/unload_browsertest.cc
index fc5ed14..55c3861 100644
--- a/chrome/browser/unload_browsertest.cc
+++ b/chrome/browser/unload_browsertest.cc
@@ -127,7 +127,7 @@
 
   void CheckTitle(const char* expected_title) {
     string16 expected = ASCIIToUTF16(expected_title);
-    EXPECT_EQ(expected, browser()->GetSelectedWebContents()->GetTitle());
+    EXPECT_EQ(expected, browser()->GetActiveWebContents()->GetTitle());
   }
 
   void NavigateToDataURL(const std::string& html_content,
@@ -274,7 +274,7 @@
   // the renderer.
   string16 expected_title = ASCIIToUTF16("cancelled");
   ui_test_utils::TitleWatcher title_watcher(
-      browser()->GetSelectedWebContents(), expected_title);
+      browser()->GetActiveWebContents(), expected_title);
   ClickModalDialogButton(false);
   ASSERT_EQ(expected_title, title_watcher.WaitAndGetTitle());
 
@@ -389,7 +389,7 @@
   ui_test_utils::WindowedNotificationObserver load_stop_observer(
       content::NOTIFICATION_LOAD_STOP,
       content::NotificationService::AllSources());
-  ui_test_utils::SimulateMouseClick(browser()->GetSelectedWebContents());
+  ui_test_utils::SimulateMouseClick(browser()->GetActiveWebContents());
   observer.Wait();
   load_stop_observer.Wait();
   CheckTitle("popup");
diff --git a/chrome/common/chrome_notification_types.h b/chrome/common/chrome_notification_types.h
index cde2ad8..d207e1b 100644
--- a/chrome/common/chrome_notification_types.h
+++ b/chrome/common/chrome_notification_types.h
@@ -146,7 +146,7 @@
   NOTIFICATION_TAB_ADDED,
 
   // This notification is sent after a tab has been appended to the tab_strip.
-  // The source is a Source<TabContentsWrapper> of the tab being added. There
+  // The source is a Source<TabContents> of the tab being added. There
   // are no details.
   NOTIFICATION_TAB_PARENTED,
 
@@ -155,15 +155,15 @@
   // closed tab.  No details are expected.
   //
   // See also NOTIFICATION_TAB_CONTENTS_DESTROYED, which is sent when the
-  // TabContentsWrapper is destroyed, and
+  // TabContents is destroyed, and
   // content::NOTIFICATION_WEB_CONTENTS_DESTROYED, which is sent when the
   // WebContents containing the NavigationController is destroyed.
   NOTIFICATION_TAB_CLOSING,
 
-  // Sent when a TabContentsWrapper is being destroyed.  At this point it's safe
-  // to call TabContentsWrapper member functions, which is not true of the
+  // Sent when a TabContents is being destroyed.  At this point it's safe
+  // to call TabContents member functions, which is not true of the
   // similar content::NOTIFICATION_WEB_CONTENTS_DESTROYED that fires later
-  // during teardown.  The source is a Source<TabContentsWrapper>.  There are no
+  // during teardown.  The source is a Source<TabContents>.  There are no
   // details.
   NOTIFICATION_TAB_CONTENTS_DESTROYED,
 
@@ -409,7 +409,7 @@
   NOTIFICATION_PRINT_JOB_EVENT,
 
   // Sent when a PrintJob has been released.
-  // Source is the TabContentsWrapper that holds the print job.
+  // Source is the TabContents that holds the print job.
   NOTIFICATION_PRINT_JOB_RELEASED,
 
   // Shutdown ----------------------------------------------------------------
@@ -442,7 +442,7 @@
   NOTIFICATION_EXTENSIONS_READY,
 
   // Sent when an extension icon being displayed in the location bar is updated.
-  // The source is the Profile and the details are the TabContentsWrapper for
+  // The source is the Profile and the details are the TabContents for
   // the tab.
   NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED,
 
@@ -1028,7 +1028,7 @@
   NOTIFICATION_INSTANT_CONTROLLER_SHOWN,
 
   // Sent when an Instant preview is committed.  The Source is the
-  // TabContentsWrapper containing the committed preview.  There are no details.
+  // TabContents containing the committed preview.  There are no details.
   NOTIFICATION_INSTANT_COMMITTED,
 
   // Sent when the instant loader determines whether the page supports the
@@ -1152,7 +1152,7 @@
   // Blocked content.
   // Sent when content changes to or from the blocked state in
   // BlockedContentTabHelper.
-  // The source is the TabContentsWrapper of the blocked content and details
+  // The source is the TabContents of the blocked content and details
   // is a boolean: true if the content is entering the blocked state, false
   // if it is leaving.
   NOTIFICATION_CONTENT_BLOCKED_STATE_CHANGED,