| 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 #import "chrome/browser/web_applications/web_app_mac.h" | 5 #import "chrome/browser/web_applications/web_app_mac.h" |
| 6 | 6 |
| 7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
| 8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 return; | 272 return; |
| 273 | 273 |
| 274 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); | 274 base::CommandLine command_line(base::CommandLine::NO_PROGRAM); |
| 275 command_line.AppendSwitchASCII( | 275 command_line.AppendSwitchASCII( |
| 276 app_mode::kLaunchedByChromeProcessId, | 276 app_mode::kLaunchedByChromeProcessId, |
| 277 base::IntToString(base::GetCurrentProcId())); | 277 base::IntToString(base::GetCurrentProcId())); |
| 278 if (launched_after_rebuild) | 278 if (launched_after_rebuild) |
| 279 command_line.AppendSwitch(app_mode::kLaunchedAfterRebuild); | 279 command_line.AppendSwitch(app_mode::kLaunchedAfterRebuild); |
| 280 // Launch without activating (kLSLaunchDontSwitch). | 280 // Launch without activating (kLSLaunchDontSwitch). |
| 281 base::mac::OpenApplicationWithPath( | 281 base::mac::OpenApplicationWithPath( |
| 282 shim_path, command_line, kLSLaunchDefaults | kLSLaunchDontSwitch, NULL); | 282 shim_path, command_line, |
| 283 NSWorkspaceLaunchDefault | NSWorkspaceLaunchWithoutActivation, nil, |
| 284 nullptr); |
| 283 } | 285 } |
| 284 | 286 |
| 285 base::FilePath GetAppLoaderPath() { | 287 base::FilePath GetAppLoaderPath() { |
| 286 return base::mac::PathForFrameworkBundleResource( | 288 return base::mac::PathForFrameworkBundleResource( |
| 287 base::mac::NSToCFCast(@"app_mode_loader.app")); | 289 base::mac::NSToCFCast(@"app_mode_loader.app")); |
| 288 } | 290 } |
| 289 | 291 |
| 290 void UpdatePlatformShortcutsInternal( | 292 void UpdatePlatformShortcutsInternal( |
| 291 const base::FilePath& app_data_path, | 293 const base::FilePath& app_data_path, |
| 292 const base::string16& old_app_title, | 294 const base::string16& old_app_title, |
| (...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1176 BuildShortcutInfoFromBundle(*it); | 1178 BuildShortcutInfoFromBundle(*it); |
| 1177 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info.get(), | 1179 WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info.get(), |
| 1178 extensions::FileHandlersInfo()); | 1180 extensions::FileHandlersInfo()); |
| 1179 shortcut_creator.DeleteShortcuts(); | 1181 shortcut_creator.DeleteShortcuts(); |
| 1180 } | 1182 } |
| 1181 } | 1183 } |
| 1182 | 1184 |
| 1183 } // namespace internals | 1185 } // namespace internals |
| 1184 | 1186 |
| 1185 } // namespace web_app | 1187 } // namespace web_app |
| OLD | NEW |