OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_commands.h" | 5 #include "chrome/browser/ui/browser_commands.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/bookmarks/bookmark_model.h" | 10 #include "chrome/browser/bookmarks/bookmark_model.h" |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 } | 529 } |
530 | 530 |
531 void MoveTabPrevious(Browser* browser) { | 531 void MoveTabPrevious(Browser* browser) { |
532 content::RecordAction(UserMetricsAction("MoveTabPrevious")); | 532 content::RecordAction(UserMetricsAction("MoveTabPrevious")); |
533 browser->tab_strip_model()->MoveTabPrevious(); | 533 browser->tab_strip_model()->MoveTabPrevious(); |
534 } | 534 } |
535 | 535 |
536 void SelectNumberedTab(Browser* browser, int index) { | 536 void SelectNumberedTab(Browser* browser, int index) { |
537 if (index < browser->tab_count()) { | 537 if (index < browser->tab_count()) { |
538 content::RecordAction(UserMetricsAction("SelectNumberedTab")); | 538 content::RecordAction(UserMetricsAction("SelectNumberedTab")); |
539 ActivateTabAt(browser, index, true); | 539 browser->tab_strip_model()->ActivateTabAt(index, true); |
540 } | 540 } |
541 } | 541 } |
542 | 542 |
543 void SelectLastTab(Browser* browser) { | 543 void SelectLastTab(Browser* browser) { |
544 content::RecordAction(UserMetricsAction("SelectLastTab")); | 544 content::RecordAction(UserMetricsAction("SelectLastTab")); |
545 browser->tab_strip_model()->SelectLastTab(); | 545 browser->tab_strip_model()->SelectLastTab(); |
546 } | 546 } |
547 | 547 |
548 void DuplicateTab(Browser* browser) { | 548 void DuplicateTab(Browser* browser) { |
549 content::RecordAction(UserMetricsAction("Duplicate")); | 549 content::RecordAction(UserMetricsAction("Duplicate")); |
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 Browser::CreateParams::CreateForApp( | 1072 Browser::CreateParams::CreateForApp( |
1073 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); | 1073 Browser::TYPE_POPUP, app_name, gfx::Rect(), browser->profile())); |
1074 app_browser->tab_strip_model()->AppendWebContents(contents, true); | 1074 app_browser->tab_strip_model()->AppendWebContents(contents, true); |
1075 | 1075 |
1076 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; | 1076 contents->GetMutableRendererPrefs()->can_accept_load_drops = false; |
1077 contents->GetRenderViewHost()->SyncRendererPrefs(); | 1077 contents->GetRenderViewHost()->SyncRendererPrefs(); |
1078 app_browser->window()->Show(); | 1078 app_browser->window()->Show(); |
1079 } | 1079 } |
1080 | 1080 |
1081 } // namespace chrome | 1081 } // namespace chrome |
OLD | NEW |