| 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/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 continue; | 768 continue; |
| 769 | 769 |
| 770 int add_types = first_tab ? TabStripModel::ADD_ACTIVE : | 770 int add_types = first_tab ? TabStripModel::ADD_ACTIVE : |
| 771 TabStripModel::ADD_NONE; | 771 TabStripModel::ADD_NONE; |
| 772 add_types |= TabStripModel::ADD_FORCE_INDEX; | 772 add_types |= TabStripModel::ADD_FORCE_INDEX; |
| 773 if (tabs[i].is_pinned) | 773 if (tabs[i].is_pinned) |
| 774 add_types |= TabStripModel::ADD_PINNED; | 774 add_types |= TabStripModel::ADD_PINNED; |
| 775 int index = chrome::GetIndexForInsertionDuringRestore(browser, i); | 775 int index = chrome::GetIndexForInsertionDuringRestore(browser, i); |
| 776 | 776 |
| 777 chrome::NavigateParams params(browser, tabs[i].url, | 777 chrome::NavigateParams params(browser, tabs[i].url, |
| 778 content::PAGE_TRANSITION_START_PAGE); | 778 content::PAGE_TRANSITION_AUTO_TOPLEVEL); |
| 779 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; | 779 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; |
| 780 params.tabstrip_index = index; | 780 params.tabstrip_index = index; |
| 781 params.tabstrip_add_types = add_types; | 781 params.tabstrip_add_types = add_types; |
| 782 params.extension_app_id = tabs[i].app_id; | 782 params.extension_app_id = tabs[i].app_id; |
| 783 chrome::Navigate(¶ms); | 783 chrome::Navigate(¶ms); |
| 784 | 784 |
| 785 first_tab = false; | 785 first_tab = false; |
| 786 } | 786 } |
| 787 if (!chrome::GetActiveWebContents(browser)) { | 787 if (!chrome::GetActiveWebContents(browser)) { |
| 788 // TODO: this is a work around for 110909. Figure out why it's needed. | 788 // TODO: this is a work around for 110909. Figure out why it's needed. |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 941 // New: | 941 // New: |
| 942 prefs->GetString(prefs::kHomePage), | 942 prefs->GetString(prefs::kHomePage), |
| 943 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 943 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
| 944 prefs->GetBoolean(prefs::kShowHomeButton), | 944 prefs->GetBoolean(prefs::kShowHomeButton), |
| 945 // Backup: | 945 // Backup: |
| 946 backup_homepage, | 946 backup_homepage, |
| 947 backup_homepage_is_ntp, | 947 backup_homepage_is_ntp, |
| 948 backup_show_home_button)); | 948 backup_show_home_button)); |
| 949 } | 949 } |
| 950 } | 950 } |
| OLD | NEW |