| 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 "chrome/browser/extensions/tab_helper.h" | 7 #include "chrome/browser/extensions/tab_helper.h" |
| 8 #include "chrome/browser/sessions/restore_tab_helper.h" | 8 #include "chrome/browser/sessions/session_tab_helper.h" |
| 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 9 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 11 #include "content/public/browser/navigation_controller.h" | 11 #include "content/public/browser/navigation_controller.h" |
| 12 #include "content/public/browser/navigation_entry.h" | 12 #include "content/public/browser/navigation_entry.h" |
| 13 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 14 | 14 |
| 15 using content::NavigationEntry; | 15 using content::NavigationEntry; |
| 16 | 16 |
| 17 TabContentsSyncedTabDelegate::TabContentsSyncedTabDelegate( | 17 TabContentsSyncedTabDelegate::TabContentsSyncedTabDelegate( |
| 18 TabContents* tab_contents) | 18 TabContents* tab_contents) |
| 19 : tab_contents_(tab_contents) {} | 19 : tab_contents_(tab_contents) {} |
| 20 | 20 |
| 21 TabContentsSyncedTabDelegate::~TabContentsSyncedTabDelegate() {} | 21 TabContentsSyncedTabDelegate::~TabContentsSyncedTabDelegate() {} |
| 22 | 22 |
| 23 SessionID::id_type TabContentsSyncedTabDelegate::GetWindowId() const { | 23 SessionID::id_type TabContentsSyncedTabDelegate::GetWindowId() const { |
| 24 return tab_contents_->restore_tab_helper()->window_id().id(); | 24 return tab_contents_->session_tab_helper()->window_id().id(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 SessionID::id_type TabContentsSyncedTabDelegate::GetSessionId() const { | 27 SessionID::id_type TabContentsSyncedTabDelegate::GetSessionId() const { |
| 28 return tab_contents_->restore_tab_helper()->session_id().id(); | 28 return tab_contents_->session_tab_helper()->session_id().id(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool TabContentsSyncedTabDelegate::IsBeingDestroyed() const { | 31 bool TabContentsSyncedTabDelegate::IsBeingDestroyed() const { |
| 32 return tab_contents_->in_destructor(); | 32 return tab_contents_->in_destructor(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 Profile* TabContentsSyncedTabDelegate::profile() const { | 35 Profile* TabContentsSyncedTabDelegate::profile() const { |
| 36 return tab_contents_->profile(); | 36 return tab_contents_->profile(); |
| 37 } | 37 } |
| 38 | 38 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 NavigationEntry* TabContentsSyncedTabDelegate::GetEntryAtIndex(int i) | 67 NavigationEntry* TabContentsSyncedTabDelegate::GetEntryAtIndex(int i) |
| 68 const { | 68 const { |
| 69 return tab_contents_->web_contents()->GetController().GetEntryAtIndex(i); | 69 return tab_contents_->web_contents()->GetController().GetEntryAtIndex(i); |
| 70 } | 70 } |
| 71 | 71 |
| 72 NavigationEntry* TabContentsSyncedTabDelegate::GetActiveEntry() const { | 72 NavigationEntry* TabContentsSyncedTabDelegate::GetActiveEntry() const { |
| 73 return tab_contents_->web_contents()->GetController().GetActiveEntry(); | 73 return tab_contents_->web_contents()->GetController().GetActiveEntry(); |
| 74 } | 74 } |
| OLD | NEW |