| 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_WINDOW_DELEGATE_ANDROID_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/sessions/core/session_id.h" | 10 #include "components/sessions/core/session_id.h" |
| 11 #include "components/sync_sessions/synced_window_delegate.h" | 11 #include "components/sync_sessions/synced_window_delegate.h" |
| 12 | 12 |
| 13 class TabModel; | 13 class TabModel; |
| 14 | 14 |
| 15 namespace sync_sessions { |
| 16 class SyncedTabDelegate; |
| 17 } // namespace sync_sessions |
| 18 |
| 15 namespace browser_sync { | 19 namespace browser_sync { |
| 16 | 20 |
| 17 class SyncedTabDelegate; | 21 class SyncedWindowDelegateAndroid : public sync_sessions::SyncedWindowDelegate { |
| 18 | |
| 19 class SyncedWindowDelegateAndroid : public browser_sync::SyncedWindowDelegate { | |
| 20 public: | 22 public: |
| 21 explicit SyncedWindowDelegateAndroid(TabModel* tab_model); | 23 explicit SyncedWindowDelegateAndroid(TabModel* tab_model); |
| 22 ~SyncedWindowDelegateAndroid() override; | 24 ~SyncedWindowDelegateAndroid() override; |
| 23 | 25 |
| 24 // browser_sync::SyncedWindowDelegate implementation. | 26 // sync_sessions::SyncedWindowDelegate implementation. |
| 25 | |
| 26 bool HasWindow() const override; | 27 bool HasWindow() const override; |
| 27 SessionID::id_type GetSessionId() const override; | 28 SessionID::id_type GetSessionId() const override; |
| 28 int GetTabCount() const override; | 29 int GetTabCount() const override; |
| 29 int GetActiveIndex() const override; | 30 int GetActiveIndex() const override; |
| 30 bool IsApp() const override; | 31 bool IsApp() const override; |
| 31 bool IsTypeTabbed() const override; | 32 bool IsTypeTabbed() const override; |
| 32 bool IsTypePopup() const override; | 33 bool IsTypePopup() const override; |
| 33 bool IsTabPinned(const SyncedTabDelegate* tab) const override; | 34 bool IsTabPinned(const sync_sessions::SyncedTabDelegate* tab) const override; |
| 34 SyncedTabDelegate* GetTabAt(int index) const override; | 35 sync_sessions::SyncedTabDelegate* GetTabAt(int index) const override; |
| 35 SessionID::id_type GetTabIdAt(int index) const override; | 36 SessionID::id_type GetTabIdAt(int index) const override; |
| 36 bool IsSessionRestoreInProgress() const override; | 37 bool IsSessionRestoreInProgress() const override; |
| 37 bool ShouldSync() const override; | 38 bool ShouldSync() const override; |
| 38 | 39 |
| 39 private: | 40 private: |
| 40 TabModel* tab_model_; | 41 TabModel* tab_model_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegateAndroid); | 43 DISALLOW_COPY_AND_ASSIGN(SyncedWindowDelegateAndroid); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace browser_sync | 46 } // namespace browser_sync |
| 46 | 47 |
| 47 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ | 48 #endif // CHROME_BROWSER_SYNC_GLUE_SYNCED_WINDOW_DELEGATE_ANDROID_H_ |
| OLD | NEW |