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 #include "content/public/browser/navigation_entry.h" | 13 #include "content/public/browser/navigation_entry.h" |
14 | 14 |
| 15 using content::NavigationEntry; |
| 16 |
15 TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate( | 17 TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate( |
16 TabContentsWrapper* tab_contents_wrapper) | 18 TabContentsWrapper* tab_contents_wrapper) |
17 : tab_contents_wrapper_(tab_contents_wrapper) {} | 19 : tab_contents_wrapper_(tab_contents_wrapper) {} |
18 | 20 |
19 TabContentsWrapperSyncedTabDelegate::~TabContentsWrapperSyncedTabDelegate() {} | 21 TabContentsWrapperSyncedTabDelegate::~TabContentsWrapperSyncedTabDelegate() {} |
20 | 22 |
21 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetWindowId() const { | 23 SessionID::id_type TabContentsWrapperSyncedTabDelegate::GetWindowId() const { |
22 return tab_contents_wrapper_->restore_tab_helper()->window_id().id(); | 24 return tab_contents_wrapper_->restore_tab_helper()->window_id().id(); |
23 } | 25 } |
24 | 26 |
(...skipping 27 matching lines...) Expand all Loading... |
52 | 54 |
53 int TabContentsWrapperSyncedTabDelegate::GetEntryCount() const { | 55 int TabContentsWrapperSyncedTabDelegate::GetEntryCount() const { |
54 return tab_contents_wrapper_->tab_contents()->GetController().entry_count(); | 56 return tab_contents_wrapper_->tab_contents()->GetController().entry_count(); |
55 } | 57 } |
56 | 58 |
57 int TabContentsWrapperSyncedTabDelegate::GetPendingEntryIndex() const { | 59 int TabContentsWrapperSyncedTabDelegate::GetPendingEntryIndex() const { |
58 return tab_contents_wrapper_->tab_contents()->GetController(). | 60 return tab_contents_wrapper_->tab_contents()->GetController(). |
59 pending_entry_index(); | 61 pending_entry_index(); |
60 } | 62 } |
61 | 63 |
62 content::NavigationEntry* | 64 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetPendingEntry() const { |
63 TabContentsWrapperSyncedTabDelegate::GetPendingEntry() const { | |
64 return | 65 return |
65 tab_contents_wrapper_->tab_contents()->GetController().GetPendingEntry(); | 66 tab_contents_wrapper_->tab_contents()->GetController().GetPendingEntry(); |
66 } | 67 } |
67 | 68 |
68 content::NavigationEntry* | 69 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i) |
69 TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i) | |
70 const { | 70 const { |
71 return | 71 return |
72 tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i); | 72 tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i); |
73 } | 73 } |
74 | 74 |
75 content::NavigationEntry* | 75 NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const { |
76 TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const { | |
77 return | 76 return |
78 tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry(); | 77 tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry(); |
79 } | 78 } |
OLD | NEW |