diff options
author | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 22:33:08 +0000 |
---|---|---|
committer | rsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 22:33:08 +0000 |
commit | aee746fa720bec218bec090746df7e04f26d9f5b (patch) | |
tree | 96e679e635f5be8fbeb008bad5c11ac8e4ecf69d /chrome/browser/sessions | |
parent | d26b4418ab4d417e87b1d3fd5367dea0cf978a7c (diff) | |
download | chromium_src-aee746fa720bec218bec090746df7e04f26d9f5b.zip chromium_src-aee746fa720bec218bec090746df7e04f26d9f5b.tar.gz chromium_src-aee746fa720bec218bec090746df7e04f26d9f5b.tar.bz2 |
[Mac] Re-enable pinned tabs; add support for mini-tabs and phantom tabs.
This CL rewires the old support for pinned tabs to support mini-tabs. This also
removes the kEnablePinnedTabs browser default now that all platforms support it.
Note that pinning is now only accessible through the context menu; drag-to-pin
has been removed.
BUG=36798, 32845
TEST=Right-click and pin two tabs. Test dragging on and off and around the tab strip.
TEST=Cmd+W a pinned tab and it should go phantom (renderer closes down) and the tab is made alpha.
Review URL: http://codereview.chromium.org/1119005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sessions')
-rw-r--r-- | chrome/browser/sessions/session_service.cc | 5 | ||||
-rw-r--r-- | chrome/browser/sessions/session_service_unittest.cc | 5 | ||||
-rw-r--r-- | chrome/browser/sessions/tab_restore_service_unittest.cc | 8 |
3 files changed, 4 insertions, 14 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc index b0fa72b..94c67ee 100644 --- a/chrome/browser/sessions/session_service.cc +++ b/chrome/browser/sessions/session_service.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -975,8 +975,7 @@ bool SessionService::CreateTabsAndWindows( PinnedStatePayload payload; if (!command->GetPayload(&payload, sizeof(payload))) return true; - if (browser_defaults::kEnablePinnedTabs) - GetTab(payload.tab_id, tabs)->pinned = payload.pinned_state; + GetTab(payload.tab_id, tabs)->pinned = payload.pinned_state; break; } diff --git a/chrome/browser/sessions/session_service_unittest.cc b/chrome/browser/sessions/session_service_unittest.cc index 20451b6..3a32b55 100644 --- a/chrome/browser/sessions/session_service_unittest.cc +++ b/chrome/browser/sessions/session_service_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -582,9 +582,6 @@ TEST_F(SessionServiceTest, PersistApplicationExtensionID) { // Explicitly set the pinned state to true and make sure we get back true. TEST_F(SessionServiceTest, PinnedTrue) { - if (!browser_defaults::kEnablePinnedTabs) - return; - EXPECT_TRUE(CreateAndWriteSessionWithOneTab(true, true)); } diff --git a/chrome/browser/sessions/tab_restore_service_unittest.cc b/chrome/browser/sessions/tab_restore_service_unittest.cc index 1cc3bf1..044dfdd 100644 --- a/chrome/browser/sessions/tab_restore_service_unittest.cc +++ b/chrome/browser/sessions/tab_restore_service_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -194,9 +194,6 @@ TEST_F(TabRestoreServiceTest, Restore) { // Tests restoring a single pinned tab. TEST_F(TabRestoreServiceTest, RestorePinnedAndApp) { - if (!browser_defaults::kEnablePinnedTabs) - return; - AddThreeNavigations(); // Have the service record the tab. @@ -373,9 +370,6 @@ TEST_F(TabRestoreServiceTest, LoadPreviousSessionAndTabs) { // Make sure pinned state is correctly loaded from session service. TEST_F(TabRestoreServiceTest, LoadPreviousSessionAndTabsPinned) { - if (!browser_defaults::kEnablePinnedTabs) - return; - CreateSessionServiceWithOneWindow(true); profile()->GetSessionService()->MoveCurrentSessionToLastSession(); |