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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 99 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
100 ->ProfileIsManaged(); | 100 ->ProfileIsManaged(); |
101 } | 101 } |
102 | 102 |
103 const std::vector<const content::NavigationEntry*>* | 103 const std::vector<const content::NavigationEntry*>* |
104 SyncedTabDelegateAndroid::GetBlockedNavigations() const { | 104 SyncedTabDelegateAndroid::GetBlockedNavigations() const { |
105 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 105 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
106 ->GetBlockedNavigations(); | 106 ->GetBlockedNavigations(); |
107 } | 107 } |
108 | 108 |
| 109 int64 SyncedTabDelegateAndroid::GetSyncId() const { |
| 110 return tab_android_->GetSyncId(); |
| 111 } |
| 112 |
| 113 void SyncedTabDelegateAndroid::SetSyncId(int64 sync_id) { |
| 114 tab_android_->SetSyncId(sync_id); |
| 115 } |
| 116 |
109 // static | 117 // static |
110 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( | 118 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( |
111 content::WebContents* web_contents) { | 119 content::WebContents* web_contents) { |
112 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); | 120 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); |
113 return tab ? tab->GetSyncedTabDelegate() : NULL; | 121 return tab ? tab->GetSyncedTabDelegate() : NULL; |
114 } | 122 } |
115 } // namespace browser_sync | 123 } // namespace browser_sync |
OLD | NEW |