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" |
11 #include "chrome/browser/sessions/session_tab_helper.h" | 11 #include "chrome/browser/sessions/session_tab_helper.h" |
12 #include "chrome/browser/sync/glue/synced_window_delegate.h" | 12 #include "chrome/browser/sync/glue/synced_window_delegate.h" |
13 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" | 13 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
14 #include "chrome/common/extensions/extension.h" | |
15 #include "content/public/browser/navigation_controller.h" | 14 #include "content/public/browser/navigation_controller.h" |
16 #include "content/public/browser/navigation_entry.h" | 15 #include "content/public/browser/navigation_entry.h" |
17 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 17 #include "extensions/common/extension.h" |
18 | 18 |
19 using content::NavigationEntry; | 19 using content::NavigationEntry; |
20 | 20 |
21 namespace browser_sync { | 21 namespace browser_sync { |
22 SyncedTabDelegateAndroid::SyncedTabDelegateAndroid(TabAndroid* tab_android) | 22 SyncedTabDelegateAndroid::SyncedTabDelegateAndroid(TabAndroid* tab_android) |
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 { |
(...skipping 90 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 |