OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/environment.h" | 10 #include "base/environment.h" |
(...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
707 params.tabstrip_index = index; | 707 params.tabstrip_index = index; |
708 params.tabstrip_add_types = add_types; | 708 params.tabstrip_add_types = add_types; |
709 params.extension_app_id = tabs[i].app_id; | 709 params.extension_app_id = tabs[i].app_id; |
710 chrome::Navigate(¶ms); | 710 chrome::Navigate(¶ms); |
711 | 711 |
712 first_tab = false; | 712 first_tab = false; |
713 } | 713 } |
714 if (!chrome::GetActiveWebContents(browser)) { | 714 if (!chrome::GetActiveWebContents(browser)) { |
715 // TODO: this is a work around for 110909. Figure out why it's needed. | 715 // TODO: this is a work around for 110909. Figure out why it's needed. |
716 if (!browser->tab_count()) | 716 if (!browser->tab_count()) |
717 browser->AddBlankTab(true); | 717 chrome::AddBlankTab(browser, true); |
718 else | 718 else |
719 chrome::ActivateTabAt(browser, 0, false); | 719 chrome::ActivateTabAt(browser, 0, false); |
720 } | 720 } |
721 | 721 |
722 browser->window()->Show(); | 722 browser->window()->Show(); |
723 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial | 723 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial |
724 // focus explicitly. | 724 // focus explicitly. |
725 chrome::GetActiveWebContents(browser)->GetView()->SetInitialFocus(); | 725 chrome::GetActiveWebContents(browser)->GetView()->SetInitialFocus(); |
726 | 726 |
727 return browser; | 727 return browser; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 // New: | 861 // New: |
862 prefs->GetString(prefs::kHomePage), | 862 prefs->GetString(prefs::kHomePage), |
863 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 863 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
864 prefs->GetBoolean(prefs::kShowHomeButton), | 864 prefs->GetBoolean(prefs::kShowHomeButton), |
865 // Backup: | 865 // Backup: |
866 backup_homepage, | 866 backup_homepage, |
867 backup_homepage_is_ntp, | 867 backup_homepage_is_ntp, |
868 backup_show_home_button)); | 868 backup_show_home_button)); |
869 } | 869 } |
870 } | 870 } |
OLD | NEW |