blob: e003a5656e5f46790577f0e7c5b92d472bec0832 [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
7#include "chrome/browser/sessions/session_tab_helper.h"
Mikel Astiz3308e2e32018-06-19 19:08:428#include "chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h"
Mikel Astizce8161732018-06-18 11:08:489
Mikel Astizce8161732018-06-18 11:08:4810BrowserSyncedTabDelegate::BrowserSyncedTabDelegate(
Mikel Astiz3308e2e32018-06-19 19:08:4211 content::WebContents* web_contents) {
Mikel Astizce8161732018-06-18 11:08:4812 SetWebContents(web_contents);
13}
14
15BrowserSyncedTabDelegate::~BrowserSyncedTabDelegate() {}
16
17SessionID BrowserSyncedTabDelegate::GetWindowId() const {
18 return SessionTabHelper::FromWebContents(web_contents())->window_id();
19}
20
21SessionID BrowserSyncedTabDelegate::GetSessionId() const {
22 return SessionTabHelper::FromWebContents(web_contents())->session_id();
23}
24
Mikel Astizce8161732018-06-18 11:08:4825bool BrowserSyncedTabDelegate::IsPlaceholderTab() const {
26 return false;
27}
François Doray4f51d5d2018-12-03 22:26:2428
29WEB_CONTENTS_USER_DATA_KEY_IMPL(BrowserSyncedTabDelegate)