1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_SYNC_TAB_CONTENTS_SYNCED_TAB_DELEGATE_H_
6 #define CHROME_BROWSER_UI_SYNC_TAB_CONTENTS_SYNCED_TAB_DELEGATE_H_
8 #include "base/compiler_specific.h"
9 #include "chrome/browser/sync/glue/synced_tab_delegate.h"
10 #include "components/sessions/session_id.h"
11 #include "content/public/browser/web_contents_user_data.h"
17 class TabContentsSyncedTabDelegate
18 : public browser_sync::SyncedTabDelegate
,
19 public content::WebContentsUserData
<TabContentsSyncedTabDelegate
> {
21 ~TabContentsSyncedTabDelegate() override
;
23 // Methods from SyncedTabDelegate.
24 SessionID::id_type
GetWindowId() const override
;
25 SessionID::id_type
GetSessionId() const override
;
26 bool IsBeingDestroyed() const override
;
27 Profile
* profile() const override
;
28 std::string
GetExtensionAppId() const override
;
29 int GetCurrentEntryIndex() const override
;
30 int GetEntryCount() const override
;
31 int GetPendingEntryIndex() const override
;
32 content::NavigationEntry
* GetPendingEntry() const override
;
33 content::NavigationEntry
* GetEntryAtIndex(int i
) const override
;
34 content::NavigationEntry
* GetActiveEntry() const override
;
35 bool ProfileIsSupervised() const override
;
36 const std::vector
<const content::NavigationEntry
*>* GetBlockedNavigations()
38 bool IsPinned() const override
;
39 bool HasWebContents() const override
;
40 content::WebContents
* GetWebContents() const override
;
41 int GetSyncId() const override
;
42 void SetSyncId(int sync_id
) override
;
45 explicit TabContentsSyncedTabDelegate(content::WebContents
* web_contents
);
46 friend class content::WebContentsUserData
<TabContentsSyncedTabDelegate
>;
48 content::WebContents
* web_contents_
;
51 DISALLOW_COPY_AND_ASSIGN(TabContentsSyncedTabDelegate
);
54 #endif // CHROME_BROWSER_UI_SYNC_TAB_CONTENTS_SYNCED_TAB_DELEGATE_H_