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 <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
870 | 870 |
871 chrome::Navigate(¶ms); | 871 chrome::Navigate(¶ms); |
872 | 872 |
873 first_tab = false; | 873 first_tab = false; |
874 } | 874 } |
875 if (!chrome::GetActiveWebContents(browser)) { | 875 if (!chrome::GetActiveWebContents(browser)) { |
876 // TODO: this is a work around for 110909. Figure out why it's needed. | 876 // TODO: this is a work around for 110909. Figure out why it's needed. |
877 if (!browser->tab_count()) | 877 if (!browser->tab_count()) |
878 chrome::AddBlankTabAt(browser, -1, true); | 878 chrome::AddBlankTabAt(browser, -1, true); |
879 else | 879 else |
880 chrome::ActivateTabAt(browser, 0, false); | 880 browser->tab_strip_model()->ActivateTabAt(0, false); |
881 } | 881 } |
882 | 882 |
883 // The default behaviour is to show the window, as expressed by the default | 883 // The default behaviour is to show the window, as expressed by the default |
884 // value of StartupBrowserCreated::show_main_browser_window_. If this was set | 884 // value of StartupBrowserCreated::show_main_browser_window_. If this was set |
885 // to true ahead of this place, it means another task must have been spawned | 885 // to true ahead of this place, it means another task must have been spawned |
886 // to take care of that. | 886 // to take care of that. |
887 if (!browser_creator_ || browser_creator_->show_main_browser_window()) | 887 if (!browser_creator_ || browser_creator_->show_main_browser_window()) |
888 browser->window()->Show(); | 888 browser->window()->Show(); |
889 | 889 |
890 return browser; | 890 return browser; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 | 1055 |
1056 #if !defined(OS_WIN) || defined(USE_AURA) | 1056 #if !defined(OS_WIN) || defined(USE_AURA) |
1057 // static | 1057 // static |
1058 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 1058 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
1059 Profile* profile, | 1059 Profile* profile, |
1060 const std::vector<GURL>& startup_urls) { | 1060 const std::vector<GURL>& startup_urls) { |
1061 return false; | 1061 return false; |
1062 } | 1062 } |
1063 #endif | 1063 #endif |
1064 | 1064 |
OLD | NEW |