| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_tab_delegate_android.h" | 5 #include "chrome/browser/sync/glue/synced_tab_delegate_android.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "chrome/browser/android/tab_android.h" | 8 #include "chrome/browser/android/tab_android.h" |
| 9 #include "chrome/browser/extensions/tab_helper.h" | 9 #include "chrome/browser/extensions/tab_helper.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 NavigationEntry* SyncedTabDelegateAndroid::GetPendingEntry() const { | 66 NavigationEntry* SyncedTabDelegateAndroid::GetPendingEntry() const { |
| 67 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 67 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
| 68 ->GetPendingEntry(); | 68 ->GetPendingEntry(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 NavigationEntry* SyncedTabDelegateAndroid::GetEntryAtIndex(int i) const { | 71 NavigationEntry* SyncedTabDelegateAndroid::GetEntryAtIndex(int i) const { |
| 72 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 72 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
| 73 ->GetEntryAtIndex(i); | 73 ->GetEntryAtIndex(i); |
| 74 } | 74 } |
| 75 | 75 |
| 76 NavigationEntry* SyncedTabDelegateAndroid::GetActiveEntry() const { | 76 NavigationEntry* SyncedTabDelegateAndroid::GetVisibleEntry() const { |
| 77 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 77 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
| 78 ->GetActiveEntry(); | 78 ->GetVisibleEntry(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 bool SyncedTabDelegateAndroid::IsPinned() const { | 81 bool SyncedTabDelegateAndroid::IsPinned() const { |
| 82 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 82 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
| 83 ->IsPinned(); | 83 ->IsPinned(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 bool SyncedTabDelegateAndroid::HasWebContents() const { | 86 bool SyncedTabDelegateAndroid::HasWebContents() const { |
| 87 return web_contents_ != NULL; | 87 return web_contents_ != NULL; |
| 88 } | 88 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 118 tab_android_->SetSyncId(sync_id); | 118 tab_android_->SetSyncId(sync_id); |
| 119 } | 119 } |
| 120 | 120 |
| 121 // static | 121 // static |
| 122 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( | 122 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( |
| 123 content::WebContents* web_contents) { | 123 content::WebContents* web_contents) { |
| 124 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); | 124 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); |
| 125 return tab ? tab->GetSyncedTabDelegate() : NULL; | 125 return tab ? tab->GetSyncedTabDelegate() : NULL; |
| 126 } | 126 } |
| 127 } // namespace browser_sync | 127 } // namespace browser_sync |
| OLD | NEW |