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 <CoreServices/CoreServices.h> | 8 #import <AppKit/AppKit.h> |
9 | 9 |
10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
13 | 13 |
14 struct ProcessSerialNumber; | 14 struct ProcessSerialNumber; |
tapted
2016/10/04 05:54:08
remove?
Eugene But (OOO till 7-30)
2016/10/04 07:02:49
Done.
| |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 namespace mac { | 17 namespace mac { |
18 | 18 |
19 // Launches the application bundle at |bundle_path|, passing argv[1..] from | 19 // Launches the application bundle at |bundle_path|, passing argv[1..] from |
20 // |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. | 21 // |launch_options| are passed directly to |
22 // |out_psn|, if not NULL, will be set to the process serial number of the | 22 // -[NSWorkspace launchApplicationAtURL:options:configuration:error:]. |
23 // application's main process if the app was successfully launched. | 23 // |out_pid|, if not null, will be set to the process id of the application's |
24 // Returns true if the app was successfully launched. | 24 // main process if the app was successfully launched. Returns true if the app |
25 BASE_EXPORT bool OpenApplicationWithPath(const FilePath& bundle_path, | 25 // was successfully launched. |
26 const CommandLine& command_line, | 26 BASE_EXPORT bool OpenApplicationWithPath( |
tapted
2016/10/04 05:54:08
Since the API is changing anyway... returning a ba
Eugene But (OOO till 7-30)
2016/10/04 07:02:49
Done.
| |
27 LSLaunchFlags launch_flags, | 27 const FilePath& bundle_path, |
28 ProcessSerialNumber* out_psn); | 28 const CommandLine& command_line, |
29 NSWorkspaceLaunchOptions launch_options, | |
30 pid_t* out_pid); | |
29 | 31 |
30 } // namespace mac | 32 } // namespace mac |
31 } // namespace base | 33 } // namespace base |
32 | 34 |
33 #endif // BASE_MAC_LAUNCH_SERVICES_UTIL_H_ | 35 #endif // BASE_MAC_LAUNCH_SERVICES_UTIL_H_ |
OLD | NEW |