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

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: a unit test 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 2e2db28480ce9b66d04e1a1bfe8437699cd0c1d3..ab2ae8596de020cf21f6083ae01bd8a342308249 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/extensions/extension_tab_util.h"
+#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/profiles/profile.h"
@@ -41,22 +42,20 @@ int ExtensionTabUtil::GetWindowIdOfTabStripModel(
return -1;
}
-// TODO(sky): this function should really take a TabContentsWrapper.
int ExtensionTabUtil::GetTabId(const WebContents* web_contents) {
const TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
- return tab ? tab->restore_tab_helper()->session_id().id() : -1;
+ return tab ? tab->extension_tab_helper()->GetTabId() : -1;
}
std::string ExtensionTabUtil::GetTabStatusText(bool is_loading) {
return is_loading ? keys::kStatusValueLoading : keys::kStatusValueComplete;
}
-// TODO(sky): this function should really take a TabContentsWrapper.
int ExtensionTabUtil::GetWindowIdOfTab(const WebContents* web_contents) {
const TabContentsWrapper* tab =
TabContentsWrapper::GetCurrentWrapperForContents(web_contents);
- return tab ? tab->restore_tab_helper()->window_id().id() : -1;
+ return tab ? tab->extension_tab_helper()->GetWindowId() : -1;
}
DictionaryValue* ExtensionTabUtil::CreateTabValue(const WebContents* contents) {

Powered by Google App Engine
This is Rietveld 408576698