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/sessions/session_service.h" | 5 #include "chrome/browser/sessions/session_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 } | 963 } |
964 | 964 |
965 case kCommandSetWindowBounds3: { | 965 case kCommandSetWindowBounds3: { |
966 WindowBoundsPayload3 payload; | 966 WindowBoundsPayload3 payload; |
967 if (!command->GetPayload(&payload, sizeof(payload))) | 967 if (!command->GetPayload(&payload, sizeof(payload))) |
968 return true; | 968 return true; |
969 GetWindow(payload.window_id, windows)->bounds.SetRect(payload.x, | 969 GetWindow(payload.window_id, windows)->bounds.SetRect(payload.x, |
970 payload.y, | 970 payload.y, |
971 payload.w, | 971 payload.w, |
972 payload.h); | 972 payload.h); |
| 973 // SHOW_STATE_INACTIVE is not persisted. |
973 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; | 974 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; |
974 if (payload.show_state > ui::SHOW_STATE_DEFAULT && | 975 if (payload.show_state > ui::SHOW_STATE_DEFAULT && |
975 payload.show_state < ui::SHOW_STATE_MAX) { | 976 payload.show_state < ui::SHOW_STATE_MAX && |
| 977 payload.show_state != ui::SHOW_STATE_INACTIVE) { |
976 show_state = static_cast<ui::WindowShowState>(payload.show_state); | 978 show_state = static_cast<ui::WindowShowState>(payload.show_state); |
977 } else { | 979 } else { |
978 NOTREACHED(); | 980 NOTREACHED(); |
979 } | 981 } |
980 GetWindow(payload.window_id, windows)->show_state = show_state; | 982 GetWindow(payload.window_id, windows)->show_state = show_state; |
981 break; | 983 break; |
982 } | 984 } |
983 | 985 |
984 case kCommandSetTabIndexInWindow: { | 986 case kCommandSetTabIndexInWindow: { |
985 TabIndexInWindowPayload payload; | 987 TabIndexInWindowPayload payload; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 50); | 1516 50); |
1515 if (use_long_period) { | 1517 if (use_long_period) { |
1516 std::string long_name_("SessionRestore.SaveLongPeriod"); | 1518 std::string long_name_("SessionRestore.SaveLongPeriod"); |
1517 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, | 1519 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, |
1518 delta, | 1520 delta, |
1519 save_delay_in_mins_, | 1521 save_delay_in_mins_, |
1520 save_delay_in_hrs_, | 1522 save_delay_in_hrs_, |
1521 50); | 1523 50); |
1522 } | 1524 } |
1523 } | 1525 } |
OLD | NEW |