OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/sessions/persistent_tab_restore_service.h" | 5 #include "chrome/browser/sessions/persistent_tab_restore_service.h" |
6 | 6 |
7 #include <cstring> // memcpy | 7 #include <cstring> // memcpy |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 helper_.ClearEntries(); | 967 helper_.ClearEntries(); |
968 } | 968 } |
969 | 969 |
970 const TabRestoreService::Entries& PersistentTabRestoreService::entries() const { | 970 const TabRestoreService::Entries& PersistentTabRestoreService::entries() const { |
971 return helper_.entries(); | 971 return helper_.entries(); |
972 } | 972 } |
973 | 973 |
974 std::vector<content::WebContents*> | 974 std::vector<content::WebContents*> |
975 PersistentTabRestoreService::RestoreMostRecentEntry( | 975 PersistentTabRestoreService::RestoreMostRecentEntry( |
976 TabRestoreServiceDelegate* delegate, | 976 TabRestoreServiceDelegate* delegate, |
977 chrome::HostDesktopType host_desktop_type) { | 977 ui::HostDesktopType host_desktop_type) { |
978 return helper_.RestoreMostRecentEntry(delegate, host_desktop_type); | 978 return helper_.RestoreMostRecentEntry(delegate, host_desktop_type); |
979 } | 979 } |
980 | 980 |
981 TabRestoreService::Tab* PersistentTabRestoreService::RemoveTabEntryById( | 981 TabRestoreService::Tab* PersistentTabRestoreService::RemoveTabEntryById( |
982 SessionID::id_type id) { | 982 SessionID::id_type id) { |
983 return helper_.RemoveTabEntryById(id); | 983 return helper_.RemoveTabEntryById(id); |
984 } | 984 } |
985 | 985 |
986 std::vector<content::WebContents*> | 986 std::vector<content::WebContents*> |
987 PersistentTabRestoreService::RestoreEntryById( | 987 PersistentTabRestoreService::RestoreEntryById( |
988 TabRestoreServiceDelegate* delegate, | 988 TabRestoreServiceDelegate* delegate, |
989 SessionID::id_type id, | 989 SessionID::id_type id, |
990 chrome::HostDesktopType host_desktop_type, | 990 ui::HostDesktopType host_desktop_type, |
991 WindowOpenDisposition disposition) { | 991 WindowOpenDisposition disposition) { |
992 return helper_.RestoreEntryById(delegate, id, host_desktop_type, disposition); | 992 return helper_.RestoreEntryById(delegate, id, host_desktop_type, disposition); |
993 } | 993 } |
994 | 994 |
995 bool PersistentTabRestoreService::IsLoaded() const { | 995 bool PersistentTabRestoreService::IsLoaded() const { |
996 return delegate_->IsLoaded(); | 996 return delegate_->IsLoaded(); |
997 } | 997 } |
998 | 998 |
999 void PersistentTabRestoreService::DeleteLastSession() { | 999 void PersistentTabRestoreService::DeleteLastSession() { |
1000 return delegate_->DeleteLastSession(); | 1000 return delegate_->DeleteLastSession(); |
1001 } | 1001 } |
1002 | 1002 |
1003 void PersistentTabRestoreService::Shutdown() { | 1003 void PersistentTabRestoreService::Shutdown() { |
1004 return delegate_->Shutdown(); | 1004 return delegate_->Shutdown(); |
1005 } | 1005 } |
1006 | 1006 |
1007 void PersistentTabRestoreService::LoadTabsFromLastSession() { | 1007 void PersistentTabRestoreService::LoadTabsFromLastSession() { |
1008 delegate_->LoadTabsFromLastSession(); | 1008 delegate_->LoadTabsFromLastSession(); |
1009 } | 1009 } |
1010 | 1010 |
1011 TabRestoreService::Entries* PersistentTabRestoreService::mutable_entries() { | 1011 TabRestoreService::Entries* PersistentTabRestoreService::mutable_entries() { |
1012 return &helper_.entries_; | 1012 return &helper_.entries_; |
1013 } | 1013 } |
1014 | 1014 |
1015 void PersistentTabRestoreService::PruneEntries() { | 1015 void PersistentTabRestoreService::PruneEntries() { |
1016 helper_.PruneEntries(); | 1016 helper_.PruneEntries(); |
1017 } | 1017 } |
OLD | NEW |