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/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1405 tab_handler_->GetTabStripModel()->SelectNextTab(); | 1405 tab_handler_->GetTabStripModel()->SelectNextTab(); |
1406 } | 1406 } |
1407 | 1407 |
1408 void Browser::SelectPreviousTab() { | 1408 void Browser::SelectPreviousTab() { |
1409 UserMetrics::RecordAction(UserMetricsAction("SelectPrevTab"), profile_); | 1409 UserMetrics::RecordAction(UserMetricsAction("SelectPrevTab"), profile_); |
1410 tab_handler_->GetTabStripModel()->SelectPreviousTab(); | 1410 tab_handler_->GetTabStripModel()->SelectPreviousTab(); |
1411 } | 1411 } |
1412 | 1412 |
1413 void Browser::OpenTabpose() { | 1413 void Browser::OpenTabpose() { |
1414 #if defined(OS_MACOSX) | 1414 #if defined(OS_MACOSX) |
| 1415 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 1416 switches::kEnableExposeForTabs)) { |
| 1417 return; |
| 1418 } |
| 1419 |
1415 UserMetrics::RecordAction(UserMetricsAction("OpenTabpose"), profile_); | 1420 UserMetrics::RecordAction(UserMetricsAction("OpenTabpose"), profile_); |
1416 window()->OpenTabpose(); | 1421 window()->OpenTabpose(); |
1417 #else | 1422 #else |
1418 NOTREACHED(); | 1423 NOTREACHED(); |
1419 #endif | 1424 #endif |
1420 } | 1425 } |
1421 | 1426 |
1422 void Browser::MoveTabNext() { | 1427 void Browser::MoveTabNext() { |
1423 UserMetrics::RecordAction(UserMetricsAction("MoveTabNext"), profile_); | 1428 UserMetrics::RecordAction(UserMetricsAction("MoveTabNext"), profile_); |
1424 tab_handler_->GetTabStripModel()->MoveTabNext(); | 1429 tab_handler_->GetTabStripModel()->MoveTabNext(); |
(...skipping 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4413 // The page transition below is only for the purpose of inserting the tab. | 4418 // The page transition below is only for the purpose of inserting the tab. |
4414 browser->AddTab(view_source_contents, PageTransition::LINK); | 4419 browser->AddTab(view_source_contents, PageTransition::LINK); |
4415 } | 4420 } |
4416 | 4421 |
4417 if (profile_->HasSessionService()) { | 4422 if (profile_->HasSessionService()) { |
4418 SessionService* session_service = profile_->GetSessionService(); | 4423 SessionService* session_service = profile_->GetSessionService(); |
4419 if (session_service) | 4424 if (session_service) |
4420 session_service->TabRestored(&view_source_contents->controller(), false); | 4425 session_service->TabRestored(&view_source_contents->controller(), false); |
4421 } | 4426 } |
4422 } | 4427 } |
OLD | NEW |