| 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 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 5 #ifndef CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
| 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 6 #define CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 bool Launch(Profile* profile, | 55 bool Launch(Profile* profile, |
| 56 const std::vector<GURL>& urls_to_open, | 56 const std::vector<GURL>& urls_to_open, |
| 57 bool process_startup); | 57 bool process_startup); |
| 58 | 58 |
| 59 // Convenience for OpenTabsInBrowser that converts |urls| into a set of | 59 // Convenience for OpenTabsInBrowser that converts |urls| into a set of |
| 60 // Tabs. | 60 // Tabs. |
| 61 Browser* OpenURLsInBrowser(Browser* browser, | 61 Browser* OpenURLsInBrowser(Browser* browser, |
| 62 bool process_startup, | 62 bool process_startup, |
| 63 const std::vector<GURL>& urls); | 63 const std::vector<GURL>& urls); |
| 64 | 64 |
| 65 // Opens |urls| after session will be restored. |
| 66 // When startup |urls| are availible and need to be stored for later opening, |
| 67 // StartupBrowserCreatorImpl which will do the job may be not availible yet - |
| 68 // so it better be static. |
| 69 static void OpenURLsAfterSessionRestore(const std::vector<GURL>& urls); |
| 70 |
| 65 private: | 71 private: |
| 66 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); | 72 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); |
| 67 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); | 73 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
| 68 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs); | 74 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs); |
| 69 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 75 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 70 DetermineStartupTabs_IncognitoOrCrash); | 76 DetermineStartupTabs_IncognitoOrCrash); |
| 71 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 77 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 72 DetermineStartupTabs_MasterPrefs); | 78 DetermineStartupTabs_MasterPrefs); |
| 73 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 79 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 74 DetermineStartupTabs_CommandLine); | 80 DetermineStartupTabs_CommandLine); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // page. | 236 // page. |
| 231 void AddSpecialURLs(std::vector<GURL>* startup_urls) const; | 237 void AddSpecialURLs(std::vector<GURL>* startup_urls) const; |
| 232 | 238 |
| 233 // Initializes |welcome_run_type_| for this launch. Also persists state to | 239 // Initializes |welcome_run_type_| for this launch. Also persists state to |
| 234 // suppress injecting the welcome page for future launches. | 240 // suppress injecting the welcome page for future launches. |
| 235 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); | 241 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); |
| 236 | 242 |
| 237 // Checks whether |profile_| has a reset trigger set. | 243 // Checks whether |profile_| has a reset trigger set. |
| 238 bool ProfileHasResetTrigger() const; | 244 bool ProfileHasResetTrigger() const; |
| 239 | 245 |
| 246 // Open URLs that are saved for delayed opening after restore session |
| 247 void OpenDeferredURLs(Browser* browser); |
| 248 |
| 240 const base::FilePath cur_dir_; | 249 const base::FilePath cur_dir_; |
| 241 const base::CommandLine& command_line_; | 250 const base::CommandLine& command_line_; |
| 242 Profile* profile_; | 251 Profile* profile_; |
| 243 StartupBrowserCreator* browser_creator_; | 252 StartupBrowserCreator* browser_creator_; |
| 244 bool is_first_run_; | 253 bool is_first_run_; |
| 245 WelcomeRunType welcome_run_type_; | 254 WelcomeRunType welcome_run_type_; |
| 246 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); | 255 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
| 247 }; | 256 }; |
| 248 | 257 |
| 249 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 258 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
| OLD | NEW |