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_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__
6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__
10 #include "chrome/browser/sessions/session_id.h"
15 class NavigationEntry
;
18 namespace browser_sync
{
20 // A SyncedTabDelegate is used to insulate the sync code from depending
21 // directly on WebContents, NavigationController, and the extensions TabHelper.
22 class SyncedTabDelegate
{
24 virtual ~SyncedTabDelegate() {}
26 // Methods from TabContents.
28 virtual SessionID::id_type
GetWindowId() const = 0;
29 virtual SessionID::id_type
GetSessionId() const = 0;
30 virtual bool IsBeingDestroyed() const = 0;
31 virtual Profile
* profile() const = 0;
33 // Method derived from extensions TabHelper.
35 virtual std::string
GetExtensionAppId() const = 0;
37 // Methods from NavigationController.
39 virtual int GetCurrentEntryIndex() const = 0;
40 virtual int GetEntryCount() const = 0;
41 virtual int GetPendingEntryIndex() const = 0;
42 virtual content::NavigationEntry
* GetPendingEntry() const = 0;
43 virtual content::NavigationEntry
* GetEntryAtIndex(int i
) const = 0;
44 virtual content::NavigationEntry
* GetActiveEntry() const = 0;
46 virtual bool IsPinned() const = 0;
49 } // namespace browser_sync
51 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__