| 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 "components/sessions/core/in_memory_tab_restore_service.h" | 5 #include "components/sessions/core/in_memory_tab_restore_service.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 | 48 |
| 49 const TabRestoreService::Entries& InMemoryTabRestoreService::entries() const { | 49 const TabRestoreService::Entries& InMemoryTabRestoreService::entries() const { |
| 50 return helper_.entries(); | 50 return helper_.entries(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 std::vector<LiveTab*> InMemoryTabRestoreService::RestoreMostRecentEntry( | 53 std::vector<LiveTab*> InMemoryTabRestoreService::RestoreMostRecentEntry( |
| 54 LiveTabContext* context) { | 54 LiveTabContext* context) { |
| 55 return helper_.RestoreMostRecentEntry(context); | 55 return helper_.RestoreMostRecentEntry(context); |
| 56 } | 56 } |
| 57 | 57 |
| 58 TabRestoreService::Tab* InMemoryTabRestoreService::RemoveTabEntryById( | 58 std::unique_ptr<TabRestoreService::Tab> |
| 59 SessionID::id_type id) { | 59 InMemoryTabRestoreService::RemoveTabEntryById(SessionID::id_type id) { |
| 60 return helper_.RemoveTabEntryById(id); | 60 return helper_.RemoveTabEntryById(id); |
| 61 } | 61 } |
| 62 | 62 |
| 63 std::vector<LiveTab*> InMemoryTabRestoreService::RestoreEntryById( | 63 std::vector<LiveTab*> InMemoryTabRestoreService::RestoreEntryById( |
| 64 LiveTabContext* context, | 64 LiveTabContext* context, |
| 65 SessionID::id_type id, | 65 SessionID::id_type id, |
| 66 WindowOpenDisposition disposition) { | 66 WindowOpenDisposition disposition) { |
| 67 return helper_.RestoreEntryById(context, id, disposition); | 67 return helper_.RestoreEntryById(context, id, disposition); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void InMemoryTabRestoreService::LoadTabsFromLastSession() { | 70 void InMemoryTabRestoreService::LoadTabsFromLastSession() { |
| 71 // Do nothing. This relies on tab persistence which is implemented in Java on | 71 // Do nothing. This relies on tab persistence which is implemented in Java on |
| 72 // the application side on Android. | 72 // the application side on Android. |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool InMemoryTabRestoreService::IsLoaded() const { | 75 bool InMemoryTabRestoreService::IsLoaded() const { |
| 76 // See comment above. | 76 // See comment above. |
| 77 return true; | 77 return true; |
| 78 } | 78 } |
| 79 | 79 |
| 80 void InMemoryTabRestoreService::DeleteLastSession() { | 80 void InMemoryTabRestoreService::DeleteLastSession() { |
| 81 // See comment above. | 81 // See comment above. |
| 82 } | 82 } |
| 83 | 83 |
| 84 void InMemoryTabRestoreService::Shutdown() { | 84 void InMemoryTabRestoreService::Shutdown() { |
| 85 } | 85 } |
| 86 | 86 |
| 87 } // namespace | 87 } // namespace |
| OLD | NEW |