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 "components/sessions/core/persistent_tab_restore_service.h" | 5 #include "components/sessions/core/persistent_tab_restore_service.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 #include <string.h> | 9 #include <string.h> |
10 #include <utility> | 10 #include <utility> |
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 tab.timestamp = base::Time(); | 826 tab.timestamp = base::Time(); |
827 } | 827 } |
828 } | 828 } |
829 if (window->tabs.empty()) | 829 if (window->tabs.empty()) |
830 return false; | 830 return false; |
831 | 831 |
832 window->selected_tab_index = | 832 window->selected_tab_index = |
833 std::min(session_window->selected_tab_index, | 833 std::min(session_window->selected_tab_index, |
834 static_cast<int>(window->tabs.size() - 1)); | 834 static_cast<int>(window->tabs.size() - 1)); |
835 window->timestamp = base::Time(); | 835 window->timestamp = base::Time(); |
| 836 window->bounds = session_window->bounds; |
| 837 window->show_state = session_window->show_state; |
836 return true; | 838 return true; |
837 } | 839 } |
838 | 840 |
839 void PersistentTabRestoreService::Delegate::LoadStateChanged() { | 841 void PersistentTabRestoreService::Delegate::LoadStateChanged() { |
840 if ((load_state_ & (LOADED_LAST_TABS | LOADED_LAST_SESSION)) != | 842 if ((load_state_ & (LOADED_LAST_TABS | LOADED_LAST_SESSION)) != |
841 (LOADED_LAST_TABS | LOADED_LAST_SESSION)) { | 843 (LOADED_LAST_TABS | LOADED_LAST_SESSION)) { |
842 // Still waiting on previous session or previous tabs. | 844 // Still waiting on previous session or previous tabs. |
843 return; | 845 return; |
844 } | 846 } |
845 | 847 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
964 | 966 |
965 TabRestoreService::Entries* PersistentTabRestoreService::mutable_entries() { | 967 TabRestoreService::Entries* PersistentTabRestoreService::mutable_entries() { |
966 return &helper_.entries_; | 968 return &helper_.entries_; |
967 } | 969 } |
968 | 970 |
969 void PersistentTabRestoreService::PruneEntries() { | 971 void PersistentTabRestoreService::PruneEntries() { |
970 helper_.PruneEntries(); | 972 helper_.PruneEntries(); |
971 } | 973 } |
972 | 974 |
973 } // namespace sessions | 975 } // namespace sessions |
OLD | NEW |