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. | |
974 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; | 973 ui::WindowShowState show_state = ui::SHOW_STATE_NORMAL; |
975 if (payload.show_state > ui::SHOW_STATE_DEFAULT && | 974 if (payload.show_state > ui::SHOW_STATE_DEFAULT && |
976 payload.show_state < ui::SHOW_STATE_MAX && | 975 payload.show_state < ui::SHOW_STATE_MAX) { |
977 payload.show_state != ui::SHOW_STATE_INACTIVE) { | |
978 show_state = static_cast<ui::WindowShowState>(payload.show_state); | 976 show_state = static_cast<ui::WindowShowState>(payload.show_state); |
979 } else { | 977 } else { |
980 NOTREACHED(); | 978 NOTREACHED(); |
981 } | 979 } |
982 GetWindow(payload.window_id, windows)->show_state = show_state; | 980 GetWindow(payload.window_id, windows)->show_state = show_state; |
983 break; | 981 break; |
984 } | 982 } |
985 | 983 |
986 case kCommandSetTabIndexInWindow: { | 984 case kCommandSetTabIndexInWindow: { |
987 TabIndexInWindowPayload payload; | 985 TabIndexInWindowPayload payload; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1516 50); | 1514 50); |
1517 if (use_long_period) { | 1515 if (use_long_period) { |
1518 std::string long_name_("SessionRestore.SaveLongPeriod"); | 1516 std::string long_name_("SessionRestore.SaveLongPeriod"); |
1519 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, | 1517 UMA_HISTOGRAM_CUSTOM_TIMES(long_name_, |
1520 delta, | 1518 delta, |
1521 save_delay_in_mins_, | 1519 save_delay_in_mins_, |
1522 save_delay_in_hrs_, | 1520 save_delay_in_hrs_, |
1523 50); | 1521 50); |
1524 } | 1522 } |
1525 } | 1523 } |
OLD | NEW |