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

Unified Diff: components/sync_sessions/synced_tab_delegate.h

Issue 2753753005: [sync] WebContentsObserver based sessions notifications (Closed)
Patch Set: [sync] WebContentsObserver based sessions notifications Created 3 years, 9 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: components/sync_sessions/synced_tab_delegate.h
diff --git a/components/sync_sessions/synced_tab_delegate.h b/components/sync_sessions/synced_tab_delegate.h
index 9781578c777463458dd41ee7b2c02bb0a5801f31..07ca76c967cf0d87464a54d9fbe4677fe803f03c 100644
--- a/components/sync_sessions/synced_tab_delegate.h
+++ b/components/sync_sessions/synced_tab_delegate.h
@@ -20,6 +20,8 @@ class SyncSessionsClient;
namespace sync_sessions {
+static const SessionID::id_type kUnknownTabID = -1;
+
// A SyncedTabDelegate is used to insulate the sync code from depending
// directly on WebContents, NavigationController, and the extensions TabHelper.
class SyncedTabDelegate {
@@ -31,6 +33,10 @@ class SyncedTabDelegate {
virtual SessionID::id_type GetSessionId() const = 0;
virtual bool IsBeingDestroyed() const = 0;
+ // Get the tab id of the tab responsible for opening this tab, if applicable.
+ // Returns -1 if no such tab exists.
Nicolas Zea 2017/03/16 19:57:44 returns kUnknownTabID
Patrick Noland 2017/03/16 20:23:27 Done.
+ virtual SessionID::id_type GetSourceTabID() const = 0;
+
// Method derived from extensions TabHelper.
virtual std::string GetExtensionAppId() const = 0;

Powered by Google App Engine
This is Rietveld 408576698