Remove some TabContentses from extensions.
This is a removal from ExtensionTabUtil and then following dependencies.
BUG=107201
TEST=no visible change
Review URL: https://chromiumcodereview.appspot.com/11308012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164963 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index c836b1b..4603a30 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -81,11 +81,10 @@
ListValue* tab_list = new ListValue();
TabStripModel* tab_strip = browser->tab_strip_model();
for (int i = 0; i < tab_strip->count(); ++i) {
- tab_list->Append(CreateTabValue(
- tab_strip->GetTabContentsAt(i)->web_contents(),
- tab_strip,
- i,
- extension));
+ tab_list->Append(CreateTabValue(tab_strip->GetWebContentsAt(i),
+ tab_strip,
+ i,
+ extension));
}
return tab_list;
@@ -157,15 +156,15 @@
}
bool ExtensionTabUtil::GetDefaultTab(Browser* browser,
- TabContents** contents,
+ WebContents** contents,
int* tab_id) {
DCHECK(browser);
DCHECK(contents);
- *contents = chrome::GetActiveTabContents(browser);
+ *contents = chrome::GetActiveWebContents(browser);
if (*contents) {
if (tab_id)
- *tab_id = GetTabId((*contents)->web_contents());
+ *tab_id = GetTabId(*contents);
return true;
}
@@ -177,7 +176,7 @@
bool include_incognito,
Browser** browser,
TabStripModel** tab_strip,
- TabContents** contents,
+ WebContents** contents,
int* tab_index) {
Profile* incognito_profile =
include_incognito && profile->HasOffTheRecordProfile() ?
@@ -189,8 +188,8 @@
target_browser->profile() == incognito_profile) {
TabStripModel* target_tab_strip = target_browser->tab_strip_model();
for (int i = 0; i < target_tab_strip->count(); ++i) {
- TabContents* target_contents = target_tab_strip->GetTabContentsAt(i);
- if (SessionID::IdForTab(target_contents->web_contents()) == tab_id) {
+ WebContents* target_contents = target_tab_strip->GetWebContentsAt(i);
+ if (SessionID::IdForTab(target_contents) == tab_id) {
if (browser)
*browser = target_browser;
if (tab_strip)