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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 private: | 71 private: |
72 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); | 72 FRIEND_TEST_ALL_PREFIXES(BrowserTest, RestorePinnedTabs); |
73 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); | 73 FRIEND_TEST_ALL_PREFIXES(BrowserTest, AppIdSwitch); |
74 | 74 |
75 // Extracts optional application window size passed in command line. | 75 // Extracts optional application window size passed in command line. |
76 void ExtractOptionalAppWindowSize(gfx::Rect* bounds); | 76 void ExtractOptionalAppWindowSize(gfx::Rect* bounds); |
77 | 77 |
78 // If the process was launched with the web application command line flags, | 78 // If the process was launched with the web application command line flags, |
79 // e.g. --app=http://www.google.com/ or --app_id=... return true. | 79 // e.g. --app=http://www.google.com/ or --app_id=... return true. |
80 // In this case |app_url| or |app_id| are populated if they're non-null. | 80 // In this case |app_url| or |app_id| are populated if they're non-null. |
81 bool IsAppLaunch(std::string* app_url, std::string* app_id); | 81 bool IsAppLaunch(Profile* profile, std::string* app_url, std::string* app_id); |
82 | 82 |
83 // If IsAppLaunch is true, tries to open an application window. | 83 // If IsAppLaunch is true, tries to open an application window. |
84 // If the app is specified to start in a tab, or IsAppLaunch is false, | 84 // If the app is specified to start in a tab, or IsAppLaunch is false, |
85 // returns false to specify default processing. |out_app_contents| is an | 85 // returns false to specify default processing. |out_app_contents| is an |
86 // optional argument to receive the created WebContents for the app. | 86 // optional argument to receive the created WebContents for the app. |
87 bool OpenApplicationWindow(Profile* profile, | 87 bool OpenApplicationWindow(Profile* profile, |
88 content::WebContents** out_app_contents); | 88 content::WebContents** out_app_contents); |
89 | 89 |
90 // If IsAppLaunch is true and the user set a pref indicating that the app | 90 // If IsAppLaunch is true and the user set a pref indicating that the app |
91 // should open in a tab, do so. | 91 // should open in a tab, do so. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 StartupBrowserCreator* browser_creator_; | 150 StartupBrowserCreator* browser_creator_; |
151 bool is_first_run_; | 151 bool is_first_run_; |
152 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); | 152 DISALLOW_COPY_AND_ASSIGN(StartupBrowserCreatorImpl); |
153 }; | 153 }; |
154 | 154 |
155 // Returns true if |profile| has exited uncleanly and has not been launched | 155 // Returns true if |profile| has exited uncleanly and has not been launched |
156 // after the unclean exit. | 156 // after the unclean exit. |
157 bool HasPendingUncleanExit(Profile* profile); | 157 bool HasPendingUncleanExit(Profile* profile); |
158 | 158 |
159 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ | 159 #endif // CHROME_BROWSER_UI_STARTUP_STARTUP_BROWSER_CREATOR_IMPL_H_ |
OLD | NEW |