| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_wrapper_synced_tab_delegate.h" | 5 #include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h" |
| 6 | 6 |
| 7 #include "content/browser/tab_contents/navigation_controller.h" | 7 #include "content/browser/tab_contents/navigation_controller.h" |
| 8 #include "content/browser/tab_contents/tab_contents.h" | 8 #include "content/browser/tab_contents/tab_contents.h" |
| 9 #include "chrome/browser/extensions/extension_tab_helper.h" | 9 #include "chrome/browser/extensions/extension_tab_helper.h" |
| 10 #include "chrome/browser/sessions/restore_tab_helper.h" | 10 #include "chrome/browser/sessions/restore_tab_helper.h" |
| 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 11 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 12 #include "chrome/common/extensions/extension.h" | 12 #include "chrome/common/extensions/extension.h" |
| 13 | 13 |
| 14 | 14 |
| 15 TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate( | 15 TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate( |
| 16 TabContentsWrapper* tab_contents_wrapper) | 16 TabContentsWrapper* tab_contents_wrapper) |
| 17 : tab_contents_wrapper_(tab_contents_wrapper) {} | 17 : tab_contents_wrapper_(tab_contents_wrapper) {} |
| 18 | 18 |
| 19 TabContentsWrapperSyncedTabDelegate::~TabContentsWrapperSyncedTabDelegate() {} | 19 TabContentsWrapperSyncedTabDelegate::~TabContentsWrapperSyncedTabDelegate() {} |
| 20 | 20 |
| 21 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetWindowId() const { | 21 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetWindowId() const { |
| 22 return tab_contents_wrapper_->restore_tab_helper()->window_id().id(); | 22 return tab_contents_wrapper_->restore_tab_helper()->window_id().id(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetSessionId() const { | 25 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetSessionId() const { |
| 26 return tab_contents_wrapper_->restore_tab_helper()->session_id().id(); | 26 return tab_contents_wrapper_->restore_tab_helper()->session_id().id(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 bool TabContentsWrapperSyncedTabDelegate::IsBeingDestroyed() const { | 29 bool TabContentsWrapperSyncedTabDelegate::IsBeingDestroyed() const { |
| 30 return tab_contents_wrapper_->tab_contents()->is_being_destroyed(); | 30 return tab_contents_wrapper_->tab_contents()->IsBeingDestroyed(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 Profile* TabContentsWrapperSyncedTabDelegate::profile() const { | 33 Profile* TabContentsWrapperSyncedTabDelegate::profile() const { |
| 34 return tab_contents_wrapper_->profile(); | 34 return tab_contents_wrapper_->profile(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 bool TabContentsWrapperSyncedTabDelegate::HasExtensionAppId() const { | 37 bool TabContentsWrapperSyncedTabDelegate::HasExtensionAppId() const { |
| 38 return (tab_contents_wrapper_->extension_tab_helper() && | 38 return (tab_contents_wrapper_->extension_tab_helper() && |
| 39 tab_contents_wrapper_->extension_tab_helper()->extension_app()); | 39 tab_contents_wrapper_->extension_tab_helper()->extension_app()); |
| 40 } | 40 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 65 | 65 |
| 66 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i) | 66 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i) |
| 67 const { | 67 const { |
| 68 return | 68 return |
| 69 tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i); | 69 tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i); |
| 70 } | 70 } |
| 71 | 71 |
| 72 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const { | 72 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const { |
| 73 return tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry()
; | 73 return tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry()
; |
| 74 } | 74 } |
| OLD | NEW |