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

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

Issue 480883002: Move session_id.{cc,h} from chrome/browser/sessions to components/sessions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « chrome/browser/sessions/session_tab_helper.h ('k') | chrome/browser/sessions/session_types.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_tab_helper.cc
diff --git a/chrome/browser/sessions/session_tab_helper.cc b/chrome/browser/sessions/session_tab_helper.cc
index 8435649f2385d162062312dc6cc9be7b67e9f671..c4c0e4e9983dff53d77b5d211f5b65d691f6de12 100644
--- a/chrome/browser/sessions/session_tab_helper.cc
+++ b/chrome/browser/sessions/session_tab_helper.cc
@@ -32,6 +32,21 @@ void SessionTabHelper::SetWindowID(const SessionID& id) {
web_contents()->GetRenderViewHost()->GetRoutingID(), id.id()));
}
+// static
+SessionID::id_type SessionTabHelper::IdForTab(const content::WebContents* tab) {
+ const SessionTabHelper* session_tab_helper =
+ tab ? SessionTabHelper::FromWebContents(tab) : NULL;
+ return session_tab_helper ? session_tab_helper->session_id().id() : -1;
+}
+
+// static
+SessionID::id_type SessionTabHelper::IdForWindowContainingTab(
+ const content::WebContents* tab) {
+ const SessionTabHelper* session_tab_helper =
+ tab ? SessionTabHelper::FromWebContents(tab) : NULL;
+ return session_tab_helper ? session_tab_helper->window_id().id() : -1;
+}
+
void SessionTabHelper::RenderViewCreated(
content::RenderViewHost* render_view_host) {
render_view_host->Send(
« no previous file with comments | « chrome/browser/sessions/session_tab_helper.h ('k') | chrome/browser/sessions/session_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698