| 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 void OpenURLsAfterSessionRestore(Browser* browser, |
| 67 bool process_startup, |
| 68 const std::vector<GURL>& urls); |
| 69 // TODO(eugenebng): this likely have to be refactored before comminting |
| 70 bool WillRestoreSession(Browser* browser, |
| 71 Profile* profile, |
| 72 bool process_startup, |
| 73 const std::vector<GURL>& urls); |
| 74 |
| 65 private: | 75 private: |
| 66 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); | 76 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); |
| 67 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); | 77 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
| 68 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs); | 78 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, DetermineStartupTabs); |
| 69 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 79 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 70 DetermineStartupTabs_IncognitoOrCrash); | 80 DetermineStartupTabs_IncognitoOrCrash); |
| 71 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 81 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 72 DetermineStartupTabs_MasterPrefs); | 82 DetermineStartupTabs_MasterPrefs); |
| 73 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, | 83 FRIEND_TEST_ALL_PREFIXES(StartupBrowserCreatorImplTest, |
| 74 DetermineStartupTabs_CommandLine); | 84 DetermineStartupTabs_CommandLine); |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 // page. | 240 // page. |
| 231 void AddSpecialURLs(std::vector<GURL>* startup_urls) const; | 241 void AddSpecialURLs(std::vector<GURL>* startup_urls) const; |
| 232 | 242 |
| 233 // Initializes |welcome_run_type_| for this launch. Also persists state to | 243 // Initializes |welcome_run_type_| for this launch. Also persists state to |
| 234 // suppress injecting the welcome page for future launches. | 244 // suppress injecting the welcome page for future launches. |
| 235 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); | 245 void InitializeWelcomeRunType(const std::vector<GURL>& urls_to_open); |
| 236 | 246 |
| 237 // Checks whether |profile_| has a reset trigger set. | 247 // Checks whether |profile_| has a reset trigger set. |
| 238 bool ProfileHasResetTrigger() const; | 248 bool ProfileHasResetTrigger() const; |
| 239 | 249 |
| 250 // Open URLs that are saved for delayed opening after restore session |
| 251 void OpenDeferredURLs(Browser* browser); |
| 252 |
| 240 const base::FilePath cur_dir_; | 253 const base::FilePath cur_dir_; |
| 241 const base::CommandLine& command_line_; | 254 const base::CommandLine& command_line_; |
| 242 Profile* profile_; | 255 Profile* profile_; |
| 243 StartupBrowserCreator* browser_creator_; | 256 StartupBrowserCreator* browser_creator_; |
| 244 bool is_first_run_; | 257 bool is_first_run_; |
| 245 WelcomeRunType welcome_run_type_; | 258 WelcomeRunType welcome_run_type_; |
| 246 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); | 259 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
| 247 }; | 260 }; |
| 248 | 261 |
| 249 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 262 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
| OLD | NEW |