OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include "chrome/browser/sessions/session_service.h" | 7 #include "chrome/browser/sessions/session_service.h" |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
968 GetWindow(payload.id, windows)->type = | 968 GetWindow(payload.id, windows)->type = |
969 BrowserTypeForWindowType( | 969 BrowserTypeForWindowType( |
970 static_cast<WindowType>(payload.index)); | 970 static_cast<WindowType>(payload.index)); |
971 break; | 971 break; |
972 } | 972 } |
973 | 973 |
974 case kCommandSetPinnedState: { | 974 case kCommandSetPinnedState: { |
975 PinnedStatePayload payload; | 975 PinnedStatePayload payload; |
976 if (!command->GetPayload(&payload, sizeof(payload))) | 976 if (!command->GetPayload(&payload, sizeof(payload))) |
977 return true; | 977 return true; |
978 if (browser_defaults::kEnablePinnedTabs) | 978 GetTab(payload.tab_id, tabs)->pinned = payload.pinned_state; |
979 GetTab(payload.tab_id, tabs)->pinned = payload.pinned_state; | |
980 break; | 979 break; |
981 } | 980 } |
982 | 981 |
983 case kCommandSetAppExtensionID: { | 982 case kCommandSetAppExtensionID: { |
984 SessionID::id_type tab_id; | 983 SessionID::id_type tab_id; |
985 std::string app_extension_id; | 984 std::string app_extension_id; |
986 if (!RestoreSetTabAppExtensionIDCommand( | 985 if (!RestoreSetTabAppExtensionIDCommand( |
987 *command, &tab_id, &app_extension_id)) { | 986 *command, &tab_id, &app_extension_id)) { |
988 return true; | 987 return true; |
989 } | 988 } |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1285 return Browser::TYPE_APP_POPUP; | 1284 return Browser::TYPE_APP_POPUP; |
1286 case TYPE_DEVTOOLS: | 1285 case TYPE_DEVTOOLS: |
1287 return Browser::TYPE_DEVTOOLS; | 1286 return Browser::TYPE_DEVTOOLS; |
1288 case TYPE_APP_PANEL: | 1287 case TYPE_APP_PANEL: |
1289 return Browser::TYPE_APP_PANEL; | 1288 return Browser::TYPE_APP_PANEL; |
1290 case TYPE_NORMAL: | 1289 case TYPE_NORMAL: |
1291 default: | 1290 default: |
1292 return Browser::TYPE_NORMAL; | 1291 return Browser::TYPE_NORMAL; |
1293 } | 1292 } |
1294 } | 1293 } |
OLD | NEW |