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

Unified Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 14514003: Make OSX App Launcher Launchable from the Dock. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase off cl14603002 Created 7 years, 8 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: chrome/browser/web_applications/web_app_mac.mm
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index 6da97950ee5a5e139698734de2e44b03c3bafc7a..af874e695adac1bebed518d0c7ada0ff17ac59b2 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -98,7 +98,6 @@ base::FilePath GetWritableApplicationsDirectory() {
} // namespace
-
namespace web_app {
const char kChromeAppDirName[] = "Chrome Apps.localized";
@@ -115,6 +114,15 @@ WebAppShortcutCreator::WebAppShortcutCreator(
WebAppShortcutCreator::~WebAppShortcutCreator() {
}
+base::FilePath WebAppShortcutCreator::GetShortcutPath() const {
+ base::FilePath dst_path = GetDestinationPath();
+ if (dst_path.empty())
+ return dst_path;
+
+ base::FilePath app_name = internals::GetSanitizedFileName(info_.title);
+ return dst_path.Append(app_name.ReplaceExtension("app"));
+}
+
bool WebAppShortcutCreator::CreateShortcut() {
base::FilePath app_name = internals::GetSanitizedFileName(info_.title);
base::FilePath app_file_name = app_name.ReplaceExtension("app");
@@ -331,6 +339,14 @@ void UpdatePlatformShortcuts(
// mac.
}
+base::FilePath GetAppInstallPath(
+ const ShellIntegration::ShortcutInfo& shortcut_info) {
+ WebAppShortcutCreator shortcut_creator(base::FilePath(),
+ shortcut_info,
+ string16());
+ return shortcut_creator.GetShortcutPath();
+}
+
} // namespace internals
} // namespace web_app
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.h ('k') | chrome/browser/web_applications/web_app_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698