| 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 <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/mac/bundle_locations.h" | 10 #include "base/mac/bundle_locations.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 [[NSWorkspace sharedWorkspace] | 241 [[NSWorkspace sharedWorkspace] |
| 242 selectFile:base::mac::FilePathToNSString(generated_bundle) | 242 selectFile:base::mac::FilePathToNSString(generated_bundle) |
| 243 inFileViewerRootedAtPath:nil]; | 243 inFileViewerRootedAtPath:nil]; |
| 244 } | 244 } |
| 245 | 245 |
| 246 } // namespace | 246 } // namespace |
| 247 | 247 |
| 248 namespace web_app { | 248 namespace web_app { |
| 249 namespace internals { | 249 namespace internals { |
| 250 | 250 |
| 251 void CreateShortcutTask(const FilePath& web_app_path, | 251 bool CreatePlatformShortcut( |
| 252 const FilePath& profile_path, | 252 const FilePath& web_app_path, |
| 253 const ShellIntegration::ShortcutInfo& shortcut_info) { | 253 const FilePath& profile_path, |
| 254 const ShellIntegration::ShortcutInfo& shortcut_info) { |
| 254 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); | 255 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); |
| 255 string16 bundle_id = UTF8ToUTF16(base::mac::BaseBundleID()); | 256 string16 bundle_id = UTF8ToUTF16(base::mac::BaseBundleID()); |
| 256 WebAppShortcutCreator shortcut_creator(web_app_path, shortcut_info, | 257 WebAppShortcutCreator shortcut_creator(web_app_path, shortcut_info, |
| 257 bundle_id); | 258 bundle_id); |
| 258 shortcut_creator.CreateShortcut(); | 259 return shortcut_creator.CreateShortcut(); |
| 259 } | 260 } |
| 260 | 261 |
| 261 } // namespace internals | 262 } // namespace internals |
| 262 } // namespace web_app | 263 } // namespace web_app |
| OLD | NEW |