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 694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
705 const StartupTabs& tabs) { | 705 const StartupTabs& tabs) { |
706 DCHECK(!tabs.empty()); | 706 DCHECK(!tabs.empty()); |
707 | 707 |
708 // If we don't yet have a profile, try to use the one we're given from | 708 // If we don't yet have a profile, try to use the one we're given from |
709 // |browser|. While we may not end up actually using |browser| (since it | 709 // |browser|. While we may not end up actually using |browser| (since it |
710 // could be a popup window), we can at least use the profile. | 710 // could be a popup window), we can at least use the profile. |
711 if (!profile_ && browser) | 711 if (!profile_ && browser) |
712 profile_ = browser->profile(); | 712 profile_ = browser->profile(); |
713 | 713 |
714 if (!browser || !browser->is_type_tabbed()) { | 714 if (!browser || !browser->is_type_tabbed()) { |
715 browser = Browser::Create(profile_); | 715 browser = new Browser(Browser::CreateParams(profile_)); |
716 } else { | 716 } else { |
717 #if defined(TOOLKIT_GTK) | 717 #if defined(TOOLKIT_GTK) |
718 // Setting the time of the last action on the window here allows us to steal | 718 // Setting the time of the last action on the window here allows us to steal |
719 // focus, which is what the user wants when opening a new tab in an existing | 719 // focus, which is what the user wants when opening a new tab in an existing |
720 // browser window. | 720 // browser window. |
721 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow()); | 721 gtk_util::SetWMLastUserActionTime(browser->window()->GetNativeWindow()); |
722 #endif | 722 #endif |
723 } | 723 } |
724 | 724 |
725 // In kiosk mode, we want to always be fullscreen, so switch to that now. | 725 // In kiosk mode, we want to always be fullscreen, so switch to that now. |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
906 // New: | 906 // New: |
907 prefs->GetString(prefs::kHomePage), | 907 prefs->GetString(prefs::kHomePage), |
908 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), | 908 prefs->GetBoolean(prefs::kHomePageIsNewTabPage), |
909 prefs->GetBoolean(prefs::kShowHomeButton), | 909 prefs->GetBoolean(prefs::kShowHomeButton), |
910 // Backup: | 910 // Backup: |
911 backup_homepage, | 911 backup_homepage, |
912 backup_homepage_is_ntp, | 912 backup_homepage_is_ntp, |
913 backup_show_home_button)); | 913 backup_show_home_button)); |
914 } | 914 } |
915 } | 915 } |
OLD | NEW |