Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2672)

Unified Diff: base/mac/launch_services_util.mm

Issue 2416313002: Prepare chrome_main_app_mode_mac.mm for 10.9 (Closed)
Patch Set: nit Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/mac/launch_services_util.mm
diff --git a/base/mac/launch_services_util.mm b/base/mac/launch_services_util.mm
index fa6e8087e68e14e792a57ca533944edd33cb6d0e..130f54c2c266655719f84fdb9c5189f9b1609f6d 100644
--- a/base/mac/launch_services_util.mm
+++ b/base/mac/launch_services_util.mm
@@ -12,7 +12,8 @@ namespace mac {
Process OpenApplicationWithPath(const base::FilePath& bundle_path,
const CommandLine& command_line,
- NSWorkspaceLaunchOptions launch_options) {
+ NSWorkspaceLaunchOptions launch_options,
+ NSAppleEventDescriptor* descriptor) {
NSString* bundle_url_spec = base::SysUTF8ToNSString(bundle_path.value());
NSURL* bundle_url = [NSURL fileURLWithPath:bundle_url_spec isDirectory:YES];
DCHECK(bundle_url);
@@ -29,9 +30,14 @@ Process OpenApplicationWithPath(const base::FilePath& bundle_path,
[launch_args addObject:base::SysUTF8ToNSString(argv[i])];
}
- NSDictionary* configuration = @{
- NSWorkspaceLaunchConfigurationArguments : launch_args,
- };
+ NSMutableDictionary* configuration = [NSMutableDictionary dictionary];
+ configuration[NSWorkspaceLaunchConfigurationArguments] = launch_args;
+ [configuration setObject:launch_args
+ forKey:NSWorkspaceLaunchConfigurationArguments];
+
+ if (descriptor)
+ configuration[NSWorkspaceLaunchConfigurationAppleEvent] = descriptor;
+
NSError* launch_error = nil;
// TODO(jeremya): this opens a new browser window if Chrome is already
// running without any windows open.

Powered by Google App Engine
This is Rietveld 408576698