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 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 tab_handler_->GetTabStripModel()->SelectNextTab(); | 1422 tab_handler_->GetTabStripModel()->SelectNextTab(); |
1423 } | 1423 } |
1424 | 1424 |
1425 void Browser::SelectPreviousTab() { | 1425 void Browser::SelectPreviousTab() { |
1426 UserMetrics::RecordAction(UserMetricsAction("SelectPrevTab"), profile_); | 1426 UserMetrics::RecordAction(UserMetricsAction("SelectPrevTab"), profile_); |
1427 tab_handler_->GetTabStripModel()->SelectPreviousTab(); | 1427 tab_handler_->GetTabStripModel()->SelectPreviousTab(); |
1428 } | 1428 } |
1429 | 1429 |
1430 void Browser::OpenTabpose() { | 1430 void Browser::OpenTabpose() { |
1431 #if defined(OS_MACOSX) | 1431 #if defined(OS_MACOSX) |
| 1432 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 1433 switches::kEnableExposeForTabs)) { |
| 1434 return; |
| 1435 } |
| 1436 |
1432 UserMetrics::RecordAction(UserMetricsAction("OpenTabpose"), profile_); | 1437 UserMetrics::RecordAction(UserMetricsAction("OpenTabpose"), profile_); |
1433 window()->OpenTabpose(); | 1438 window()->OpenTabpose(); |
1434 #else | 1439 #else |
1435 NOTREACHED(); | 1440 NOTREACHED(); |
1436 #endif | 1441 #endif |
1437 } | 1442 } |
1438 | 1443 |
1439 void Browser::MoveTabNext() { | 1444 void Browser::MoveTabNext() { |
1440 UserMetrics::RecordAction(UserMetricsAction("MoveTabNext"), profile_); | 1445 UserMetrics::RecordAction(UserMetricsAction("MoveTabNext"), profile_); |
1441 tab_handler_->GetTabStripModel()->MoveTabNext(); | 1446 tab_handler_->GetTabStripModel()->MoveTabNext(); |
(...skipping 2978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4420 // The page transition below is only for the purpose of inserting the tab. | 4425 // The page transition below is only for the purpose of inserting the tab. |
4421 browser->AddTab(view_source_contents, PageTransition::LINK); | 4426 browser->AddTab(view_source_contents, PageTransition::LINK); |
4422 } | 4427 } |
4423 | 4428 |
4424 if (profile_->HasSessionService()) { | 4429 if (profile_->HasSessionService()) { |
4425 SessionService* session_service = profile_->GetSessionService(); | 4430 SessionService* session_service = profile_->GetSessionService(); |
4426 if (session_service) | 4431 if (session_service) |
4427 session_service->TabRestored(&view_source_contents->controller(), false); | 4432 session_service->TabRestored(&view_source_contents->controller(), false); |
4428 } | 4433 } |
4429 } | 4434 } |
OLD | NEW |