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 12 matching lines...) Expand all Loading... |
23 : web_contents_(NULL), tab_android_(tab_android) {} | 23 : web_contents_(NULL), tab_android_(tab_android) {} |
24 | 24 |
25 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {} | 25 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {} |
26 | 26 |
27 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const { | 27 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const { |
28 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 28 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
29 ->GetWindowId(); | 29 ->GetWindowId(); |
30 } | 30 } |
31 | 31 |
32 SessionID::id_type SyncedTabDelegateAndroid::GetSessionId() const { | 32 SessionID::id_type SyncedTabDelegateAndroid::GetSessionId() const { |
33 return tab_android_->id().id(); | 33 return tab_android_->session_id().id(); |
34 } | 34 } |
35 | 35 |
36 bool SyncedTabDelegateAndroid::IsBeingDestroyed() const { | 36 bool SyncedTabDelegateAndroid::IsBeingDestroyed() const { |
37 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 37 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
38 ->IsBeingDestroyed(); | 38 ->IsBeingDestroyed(); |
39 } | 39 } |
40 | 40 |
41 Profile* SyncedTabDelegateAndroid::profile() const { | 41 Profile* SyncedTabDelegateAndroid::profile() const { |
42 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) | 42 return TabContentsSyncedTabDelegate::FromWebContents(web_contents_) |
43 ->profile(); | 43 ->profile(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |