| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "chrome/browser/sessions/session_id.h" | 11 #include "chrome/browser/sessions/session_id.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 namespace content { | 15 namespace content { |
| 16 class NavigationEntry; | 16 class NavigationEntry; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace browser_sync { | 19 namespace browser_sync { |
| 20 | 20 |
| 21 // A SyncedTabDelegate is used to insulate the sync code from depending | 21 // A SyncedTabDelegate is used to insulate the sync code from depending |
| 22 // directly on TabContents, TabContentsWrapper and NavigationController. | 22 // directly on WebContents, TabContentsWrapper and NavigationController. |
| 23 class SyncedTabDelegate { | 23 class SyncedTabDelegate { |
| 24 public: | 24 public: |
| 25 virtual ~SyncedTabDelegate() {} | 25 virtual ~SyncedTabDelegate() {} |
| 26 | 26 |
| 27 // Method from TabContentsWrapper. | 27 // Method from TabContentsWrapper. |
| 28 | 28 |
| 29 virtual SessionID::id_type GetWindowId() const = 0; | 29 virtual SessionID::id_type GetWindowId() const = 0; |
| 30 virtual SessionID::id_type GetSessionId() const = 0; | 30 virtual SessionID::id_type GetSessionId() const = 0; |
| 31 virtual bool IsBeingDestroyed() const = 0; | 31 virtual bool IsBeingDestroyed() const = 0; |
| 32 virtual Profile* profile() const = 0; | 32 virtual Profile* profile() const = 0; |
| 33 | 33 |
| 34 // Method derived from TabContentsWrapper. | 34 // Method derived from TabContentsWrapper. |
| 35 | 35 |
| 36 virtual bool HasExtensionAppId() const = 0; | 36 virtual bool HasExtensionAppId() const = 0; |
| 37 virtual const std::string& GetExtensionAppId() const = 0; | 37 virtual const std::string& GetExtensionAppId() const = 0; |
| 38 | 38 |
| 39 // Method from NavigationController | 39 // Method from NavigationController |
| 40 | 40 |
| 41 virtual int GetCurrentEntryIndex() const = 0; | 41 virtual int GetCurrentEntryIndex() const = 0; |
| 42 virtual int GetEntryCount() const = 0; | 42 virtual int GetEntryCount() const = 0; |
| 43 virtual int GetPendingEntryIndex() const = 0; | 43 virtual int GetPendingEntryIndex() const = 0; |
| 44 virtual content::NavigationEntry* GetPendingEntry() const = 0; | 44 virtual content::NavigationEntry* GetPendingEntry() const = 0; |
| 45 virtual content::NavigationEntry* GetEntryAtIndex(int i) const = 0; | 45 virtual content::NavigationEntry* GetEntryAtIndex(int i) const = 0; |
| 46 virtual content::NavigationEntry* GetActiveEntry() const = 0; | 46 virtual content::NavigationEntry* GetActiveEntry() const = 0; |
| 47 }; | 47 }; |
| 48 | 48 |
| 49 } // namespace browser_sync | 49 } // namespace browser_sync |
| 50 | 50 |
| 51 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ | 51 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_TAB_DELEGATE_H__ |
| OLD | NEW |