OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/sync/tab_contents_synced_tab_delegate.h" | 5 #include "chrome/browser/ui/sync/tab_contents_synced_tab_delegate.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/sessions/session_tab_helper.h" | 9 #include "chrome/browser/sessions/session_tab_helper.h" |
| 10 #include "chrome/browser/sync/sessions/sync_sessions_router_tab_helper.h" |
10 #include "chrome/common/features.h" | 11 #include "chrome/common/features.h" |
11 #include "components/sessions/content/content_serialized_navigation_builder.h" | 12 #include "components/sessions/content/content_serialized_navigation_builder.h" |
12 #include "components/sync_sessions/sync_sessions_client.h" | 13 #include "components/sync_sessions/sync_sessions_client.h" |
13 #include "components/sync_sessions/synced_window_delegate.h" | 14 #include "components/sync_sessions/synced_window_delegate.h" |
14 #include "components/sync_sessions/synced_window_delegates_getter.h" | 15 #include "components/sync_sessions/synced_window_delegates_getter.h" |
15 #include "content/public/browser/favicon_status.h" | 16 #include "content/public/browser/favicon_status.h" |
16 #include "content/public/browser/navigation_controller.h" | 17 #include "content/public/browser/navigation_controller.h" |
17 #include "content/public/browser/navigation_entry.h" | 18 #include "content/public/browser/navigation_entry.h" |
18 #include "content/public/browser/web_contents.h" | 19 #include "content/public/browser/web_contents.h" |
19 #include "extensions/features/features.h" | 20 #include "extensions/features/features.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 for (int i = 0; i < entry_count; ++i) { | 158 for (int i = 0; i < entry_count; ++i) { |
158 const GURL& virtual_url = GetVirtualURLAtIndex(i); | 159 const GURL& virtual_url = GetVirtualURLAtIndex(i); |
159 if (!virtual_url.is_valid()) | 160 if (!virtual_url.is_valid()) |
160 continue; | 161 continue; |
161 | 162 |
162 if (sessions_client->ShouldSyncURL(virtual_url)) | 163 if (sessions_client->ShouldSyncURL(virtual_url)) |
163 return true; | 164 return true; |
164 } | 165 } |
165 return false; | 166 return false; |
166 } | 167 } |
| 168 |
| 169 SessionID::id_type TabContentsSyncedTabDelegate::GetSourceTabID() const { |
| 170 sync_sessions::SyncSessionsRouterTabHelper* helper = |
| 171 sync_sessions::SyncSessionsRouterTabHelper::FromWebContents( |
| 172 web_contents_); |
| 173 return helper->source_tab_id(); |
| 174 } |
OLD | NEW |