Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5491)

Unified Diff: chrome/browser/extensions/extension_tab_util.cc

Issue 10443105: Take 2 at implementing activeTab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: empty -> is_empty Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_tab_util.cc
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index d2cd5b3babe850244427066fdc757c6f48193d59..e8251a0202600710f4d1af8d6e026ecfe554485d 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/extensions/api/tabs/tabs_constants.h"
+#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
@@ -41,20 +42,18 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
return -1;
}
-// TODO(sky): this function should really take a TabContents.
int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
const TabContents* tab = TabContents::FromWebContents(web_contents);
- return tab ? tab->restore_tab_helper()->session_id().id() : -1;
+ return tab ? tab->extension_tab_helper()->tab_id() : -1;
}
std::string ExtensionTabUtil::GetTabStatusText(bool is_loading) {
return is_loading ? keys::kStatusValueLoading : keys::kStatusValueComplete;
}
-// TODO(sky): this function should really take a TabContents.
int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
const TabContents* tab = TabContents::FromWebContents(web_contents);
- return tab ? tab->restore_tab_helper()->window_id().id() : -1;
+ return tab ? tab->extension_tab_helper()->window_id() : -1;
}
DictionaryValue* ExtensionTabUtil::CreateTabValue(const WebContents* contents) {
« no previous file with comments | « chrome/browser/extensions/extension_tab_helper.cc ('k') | chrome/browser/extensions/extension_toolbar_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698