| 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 #include "chrome/browser/sync/glue/synced_window_delegate_android.h" | 5 #include "chrome/browser/sync/glue/synced_window_delegate_android.h" |
| 6 | 6 |
| 7 #include "chrome/browser/profiles/profile.h" | 7 #include "chrome/browser/profiles/profile.h" |
| 8 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 8 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
| 9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" | 9 #include "chrome/browser/ui/android/tab_model/tab_model_list.h" |
| 10 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 11 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 11 #include "chrome/browser/sessions/session_id.h" | 12 #include "chrome/browser/sessions/session_id.h" |
| 12 | 13 |
| 13 namespace browser_sync { | 14 namespace browser_sync { |
| 14 | 15 |
| 15 // SyncedWindowDelegate implementations | 16 // SyncedWindowDelegate implementations |
| 16 | 17 |
| 17 const std::set<SyncedWindowDelegate*> | 18 const std::set<SyncedWindowDelegate*> |
| 18 SyncedWindowDelegate::GetSyncedWindowDelegates() { | 19 SyncedWindowDelegate::GetSyncedWindowDelegates() { |
| 19 std::set<SyncedWindowDelegate*> synced_window_delegates; | 20 std::set<SyncedWindowDelegate*> synced_window_delegates; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 return false; | 71 return false; |
| 71 } | 72 } |
| 72 | 73 |
| 73 bool SyncedWindowDelegateAndroid::IsTabPinned( | 74 bool SyncedWindowDelegateAndroid::IsTabPinned( |
| 74 const SyncedTabDelegate* tab) const { | 75 const SyncedTabDelegate* tab) const { |
| 75 return false; | 76 return false; |
| 76 } | 77 } |
| 77 | 78 |
| 78 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { | 79 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { |
| 79 TabContents* tab_contents = tab_model_->GetTabContentsAt(index); | 80 TabContents* tab_contents = tab_model_->GetTabContentsAt(index); |
| 80 return tab_contents ? tab_contents->synced_tab_delegate() : NULL; | 81 return tab_contents ? TabContentsSyncedTabDelegate::FromWebContents( |
| 82 tab_contents->web_contents()) : NULL; |
| 81 } | 83 } |
| 82 | 84 |
| 83 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { | 85 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { |
| 84 return tab_model_->GetTabIdAt(index); | 86 return tab_model_->GetTabIdAt(index); |
| 85 } | 87 } |
| 86 | 88 |
| 87 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { | 89 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { |
| 88 return tab_model_->IsSessionRestoreInProgress(); | 90 return tab_model_->IsSessionRestoreInProgress(); |
| 89 } | 91 } |
| 90 | 92 |
| 91 } // namespace browser_sync | 93 } // namespace browser_sync |
| OLD | NEW |