OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 BASE_MAC_LAUNCH_SERVICES_UTIL_H_ | 5 #ifndef BASE_MAC_LAUNCH_SERVICES_UTIL_H_ |
6 #define BASE_MAC_LAUNCH_SERVICES_UTIL_H_ | 6 #define BASE_MAC_LAUNCH_SERVICES_UTIL_H_ |
7 | 7 |
| 8 #include <ApplicationServices/ApplicationServices.h> |
| 9 |
8 #include "base/base_export.h" | 10 #include "base/base_export.h" |
9 #include "base/command_line.h" | 11 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
11 | 13 |
12 struct ProcessSerialNumber; | 14 struct ProcessSerialNumber; |
13 | 15 |
14 namespace base { | 16 namespace base { |
15 namespace mac { | 17 namespace mac { |
16 | 18 |
17 // Launches the application bundle at |bundle_path|, passing argv[1..] from | 19 // Launches the application bundle at |bundle_path|, passing argv[1..] from |
18 // |command_line| as command line arguments if the app isn't already running. | 20 // |command_line| as command line arguments if the app isn't already running. |
| 21 // |launch_flags| are passed directly to LSApplicationParameters. |
19 // |out_psn|, if not NULL, will be set to the process serial number of the | 22 // |out_psn|, if not NULL, will be set to the process serial number of the |
20 // application's main process if the app was successfully launched. | 23 // application's main process if the app was successfully launched. |
21 // Returns true if the app was successfully launched. | 24 // Returns true if the app was successfully launched. |
22 BASE_EXPORT bool OpenApplicationWithPath(const base::FilePath& bundle_path, | 25 BASE_EXPORT bool OpenApplicationWithPath(const base::FilePath& bundle_path, |
23 const CommandLine& command_line, | 26 const CommandLine& command_line, |
| 27 LSLaunchFlags launch_flags, |
24 ProcessSerialNumber* out_psn); | 28 ProcessSerialNumber* out_psn); |
25 | 29 |
26 } // namespace mac | 30 } // namespace mac |
27 } // namespace base | 31 } // namespace base |
28 | 32 |
29 #endif // BASE_MAC_LAUNCH_SERVICES_UTIL_H_ | 33 #endif // BASE_MAC_LAUNCH_SERVICES_UTIL_H_ |
OLD | NEW |