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

Unified Diff: chrome/browser/sessions/session_id.cc

Issue 10912156: Move SessionID, CaptureVisibleTabFunction to WebContents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase atop the extension tab helper change Created 8 years, 3 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/sessions/session_id.cc
diff --git a/chrome/browser/sessions/session_id.cc b/chrome/browser/sessions/session_id.cc
index 80f690a83f0197dbf4640348da200dbff3cb7530..a177736c9f83b4786f233ea5e26f346f5176eec9 100644
--- a/chrome/browser/sessions/session_id.cc
+++ b/chrome/browser/sessions/session_id.cc
@@ -13,10 +13,17 @@ SessionID::SessionID() {
id_ = next_id++;
}
-SessionID::id_type SessionID::IdForTab(const TabContents* tab) {
- return tab ? tab->session_tab_helper()->session_id().id() : -1;
+SessionID::id_type SessionID::IdForTab(const content::WebContents* tab) {
+ const TabContents* tab_contents = tab ? TabContents::FromWebContents(tab)
+ : NULL;
+ return tab_contents ? tab_contents->session_tab_helper()->session_id().id()
+ : -1;
}
-SessionID::id_type SessionID::IdForWindowContainingTab(const TabContents* tab) {
- return tab ? tab->session_tab_helper()->window_id().id() : -1;
+SessionID::id_type SessionID::IdForWindowContainingTab(
+ const content::WebContents* tab) {
+ const TabContents* tab_contents = tab ? TabContents::FromWebContents(tab)
+ : NULL;
+ return tab_contents ? tab_contents->session_tab_helper()->window_id().id()
+ : -1;
}
« no previous file with comments | « chrome/browser/sessions/session_id.h ('k') | chrome/browser/ui/cocoa/location_bar/page_action_decoration.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698