Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: chrome/browser/sessions/session_service.cc

Issue 1119005: [Mac] Re-enable pinned tabs; add support for mini-tabs and phantom tabs. (Closed)
Patch Set: Nits Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/defaults.cc ('k') | chrome/browser/sessions/session_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698