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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // Window behaviors possible when opening Chrome. | 92 // Window behaviors possible when opening Chrome. |
93 enum class BrowserOpenBehavior { | 93 enum class BrowserOpenBehavior { |
94 NEW, // Open in a new browser. | 94 NEW, // Open in a new browser. |
95 SYNCHRONOUS_RESTORE, // Attempt a synchronous session restore. | 95 SYNCHRONOUS_RESTORE, // Attempt a synchronous session restore. |
96 USE_EXISTING, // Attempt to add to an existing tabbed browser. | 96 USE_EXISTING, // Attempt to add to an existing tabbed browser. |
97 }; | 97 }; |
98 | 98 |
99 // Boolean flags used to indicate state for DetermineBrowserOpenBehavior. | 99 // Boolean flags used to indicate state for DetermineBrowserOpenBehavior. |
100 enum BehaviorFlags { | 100 enum BehaviorFlags { |
101 PROCESS_STARTUP = (1 << 0), | 101 PROCESS_STARTUP = (1 << 0), |
102 IS_POST_CRASH_LAUNCH = (1 << 1), | 102 IS_POST_CRASH_LAUNCH = (1 << 1), |
103 HAS_RESTORE_SWITCH = (1 << 2), | 103 HAS_NEW_WINDOW_SWITCH = (1 << 2), |
104 HAS_NEW_WINDOW_SWITCH = (1 << 3), | 104 HAS_CMD_LINE_TABS = (1 << 3), |
105 HAS_CMD_LINE_TABS = (1 << 4), | |
106 }; | 105 }; |
107 | 106 |
108 using BrowserOpenBehaviorOptions = uint32_t; | 107 using BrowserOpenBehaviorOptions = uint32_t; |
109 | 108 |
110 // Creates a tab for each of the Tabs in |tabs|. If browser is non-null | 109 // Creates a tab for each of the Tabs in |tabs|. If browser is non-null |
111 // and a tabbed browser, the tabs are added to it. Otherwise a new tabbed | 110 // and a tabbed browser, the tabs are added to it. Otherwise a new tabbed |
112 // browser is created and the tabs are added to it. The browser the tabs | 111 // browser is created and the tabs are added to it. The browser the tabs |
113 // are added to is returned, which is either |browser| or the newly created | 112 // are added to is returned, which is either |browser| or the newly created |
114 // browser. | 113 // browser. |
115 Browser* OpenTabsInBrowser(Browser* browser, | 114 Browser* OpenTabsInBrowser(Browser* browser, |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 const base::FilePath cur_dir_; | 239 const base::FilePath cur_dir_; |
241 const base::CommandLine& command_line_; | 240 const base::CommandLine& command_line_; |
242 Profile* profile_; | 241 Profile* profile_; |
243 StartupBrowserCreator* browser_creator_; | 242 StartupBrowserCreator* browser_creator_; |
244 bool is_first_run_; | 243 bool is_first_run_; |
245 WelcomeRunType welcome_run_type_; | 244 WelcomeRunType welcome_run_type_; |
246 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); | 245 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
247 }; | 246 }; |
248 | 247 |
249 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 248 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
OLD | NEW |