blob: 154932edf43db3c26908253a34582097569cc27b [file] [log] [blame]
Mikel Astizce8161732018-06-18 11:08:481// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "chrome/browser/ui/sync/browser_synced_tab_delegate.h"
6
Mikel Astiz3308e2e32018-06-19 19:08:427#include "chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h"
Scott Violet5655874f2020-01-14 21:03:218#include "components/sessions/content/session_tab_helper.h"
Mikel Astizce8161732018-06-18 11:08:489
Mikel Astizce8161732018-06-18 11:08:4810BrowserSyncedTabDelegate::BrowserSyncedTabDelegate(
Dave Tapuskaeeb68792021-11-16 21:38:4011 content::WebContents* web_contents)
12 : content::WebContentsUserData<BrowserSyncedTabDelegate>(*web_contents) {
Mikel Astizce8161732018-06-18 11:08:4813 SetWebContents(web_contents);
14}
15
16BrowserSyncedTabDelegate::~BrowserSyncedTabDelegate() {}
17
18SessionID BrowserSyncedTabDelegate::GetWindowId() const {
Scott Violet5655874f2020-01-14 21:03:2119 return sessions::SessionTabHelper::FromWebContents(web_contents())
20 ->window_id();
Mikel Astizce8161732018-06-18 11:08:4821}
22
23SessionID BrowserSyncedTabDelegate::GetSessionId() const {
Scott Violet5655874f2020-01-14 21:03:2124 return sessions::SessionTabHelper::FromWebContents(web_contents())
25 ->session_id();
Mikel Astizce8161732018-06-18 11:08:4826}
27
28bool BrowserSyncedTabDelegate::IsPlaceholderTab() const {
29 return false;
30}
François Doray4f51d5d2018-12-03 22:26:2431
Daniel Cheng383df852021-10-02 03:28:0132WEB_CONTENTS_USER_DATA_KEY_IMPL(BrowserSyncedTabDelegate);