| 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/android/tab_android.h" | 7 #include "chrome/browser/android/tab_android.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" | 9 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" |
| 10 #include "chrome/browser/ui/android/tab_model/tab_model.h" | 10 #include "chrome/browser/ui/android/tab_model/tab_model.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 } | 52 } |
| 53 | 53 |
| 54 bool SyncedWindowDelegateAndroid::IsTabPinned( | 54 bool SyncedWindowDelegateAndroid::IsTabPinned( |
| 55 const SyncedTabDelegate* tab) const { | 55 const SyncedTabDelegate* tab) const { |
| 56 return false; | 56 return false; |
| 57 } | 57 } |
| 58 | 58 |
| 59 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { | 59 SyncedTabDelegate* SyncedWindowDelegateAndroid::GetTabAt(int index) const { |
| 60 // After a restart, it is possible for the Tab to be null during startup. | 60 // After a restart, it is possible for the Tab to be null during startup. |
| 61 TabAndroid* tab = tab_model_->GetTabAt(index); | 61 TabAndroid* tab = tab_model_->GetTabAt(index); |
| 62 return tab ? tab->GetSyncedTabDelegate() : NULL; | 62 return tab ? tab->GetSyncedTabDelegate() : nullptr; |
| 63 } | 63 } |
| 64 | 64 |
| 65 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { | 65 SessionID::id_type SyncedWindowDelegateAndroid::GetTabIdAt(int index) const { |
| 66 SyncedTabDelegate* tab = GetTabAt(index); | 66 SyncedTabDelegate* tab = GetTabAt(index); |
| 67 return tab ? tab->GetSessionId() : -1; | 67 return tab ? tab->GetSessionId() : -1; |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { | 70 bool SyncedWindowDelegateAndroid::IsSessionRestoreInProgress() const { |
| 71 return tab_model_->IsSessionRestoreInProgress(); | 71 return tab_model_->IsSessionRestoreInProgress(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 bool SyncedWindowDelegateAndroid::ShouldSync() const { | 74 bool SyncedWindowDelegateAndroid::ShouldSync() const { |
| 75 return true; | 75 return true; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace browser_sync | 78 } // namespace browser_sync |
| OLD | NEW |