| 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 "components/sync_driver/glue/synced_window_delegate.h" | 10 #include "components/sync_driver/glue/synced_window_delegate.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const { | 50 std::string TabContentsSyncedTabDelegate::GetExtensionAppId() const { |
| 51 #if defined(ENABLE_EXTENSIONS) | 51 #if defined(ENABLE_EXTENSIONS) |
| 52 const scoped_refptr<const extensions::Extension> extension_app( | 52 const scoped_refptr<const extensions::Extension> extension_app( |
| 53 extensions::TabHelper::FromWebContents(web_contents_)->extension_app()); | 53 extensions::TabHelper::FromWebContents(web_contents_)->extension_app()); |
| 54 if (extension_app.get()) | 54 if (extension_app.get()) |
| 55 return extension_app->id(); | 55 return extension_app->id(); |
| 56 #endif | 56 #endif |
| 57 return std::string(); | 57 return std::string(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 bool TabContentsSyncedTabDelegate::IsInitialBlankNavigation() const { |
| 61 return web_contents_->GetController().IsInitialBlankNavigation(); |
| 62 } |
| 63 |
| 60 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const { | 64 int TabContentsSyncedTabDelegate::GetCurrentEntryIndex() const { |
| 61 return web_contents_->GetController().GetCurrentEntryIndex(); | 65 return web_contents_->GetController().GetCurrentEntryIndex(); |
| 62 } | 66 } |
| 63 | 67 |
| 64 int TabContentsSyncedTabDelegate::GetEntryCount() const { | 68 int TabContentsSyncedTabDelegate::GetEntryCount() const { |
| 65 return web_contents_->GetController().GetEntryCount(); | 69 return web_contents_->GetController().GetEntryCount(); |
| 66 } | 70 } |
| 67 | 71 |
| 68 int TabContentsSyncedTabDelegate::GetPendingEntryIndex() const { | 72 int TabContentsSyncedTabDelegate::GetPendingEntryIndex() const { |
| 69 return web_contents_->GetController().GetPendingEntryIndex(); | 73 return web_contents_->GetController().GetPendingEntryIndex(); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 return web_contents_; | 115 return web_contents_; |
| 112 } | 116 } |
| 113 | 117 |
| 114 int TabContentsSyncedTabDelegate::GetSyncId() const { | 118 int TabContentsSyncedTabDelegate::GetSyncId() const { |
| 115 return sync_session_id_; | 119 return sync_session_id_; |
| 116 } | 120 } |
| 117 | 121 |
| 118 void TabContentsSyncedTabDelegate::SetSyncId(int sync_id) { | 122 void TabContentsSyncedTabDelegate::SetSyncId(int sync_id) { |
| 119 sync_session_id_ = sync_id; | 123 sync_session_id_ = sync_id; |
| 120 } | 124 } |
| OLD | NEW |