| 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" | |
| 10 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/browser/sessions/session_tab_helper.h" | |
| 12 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 10 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
| 13 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 11 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
| 14 #include "content/public/browser/navigation_controller.h" | |
| 15 #include "content/public/browser/navigation_entry.h" | 12 #include "content/public/browser/navigation_entry.h" |
| 16 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 17 #include "extensions/common/extension.h" | |
| 18 | 14 |
| 19 using content::NavigationEntry; | 15 using content::NavigationEntry; |
| 20 | 16 |
| 21 namespace browser_sync { | 17 namespace browser_sync { |
| 22 SyncedTabDelegateAndroid::SyncedTabDelegateAndroid(TabAndroid* tab_android) | 18 SyncedTabDelegateAndroid::SyncedTabDelegateAndroid(TabAndroid* tab_android) |
| 23 : web_contents_(NULL), tab_android_(tab_android) {} | 19 : web_contents_(NULL), tab_android_(tab_android) {} |
| 24 | 20 |
| 25 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {} | 21 SyncedTabDelegateAndroid::~SyncedTabDelegateAndroid() {} |
| 26 | 22 |
| 27 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const { | 23 SessionID::id_type SyncedTabDelegateAndroid::GetWindowId() const { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 tab_android_->SetSyncId(sync_id); | 114 tab_android_->SetSyncId(sync_id); |
| 119 } | 115 } |
| 120 | 116 |
| 121 // static | 117 // static |
| 122 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( | 118 SyncedTabDelegate* SyncedTabDelegate::ImplFromWebContents( |
| 123 content::WebContents* web_contents) { | 119 content::WebContents* web_contents) { |
| 124 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); | 120 TabAndroid* tab = TabAndroid::FromWebContents(web_contents); |
| 125 return tab ? tab->GetSyncedTabDelegate() : NULL; | 121 return tab ? tab->GetSyncedTabDelegate() : NULL; |
| 126 } | 122 } |
| 127 } // namespace browser_sync | 123 } // namespace browser_sync |
| OLD | NEW |