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 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1134 for (std::vector<base::FilePath>::const_iterator it = bundles.begin(); | 1134 for (std::vector<base::FilePath>::const_iterator it = bundles.begin(); |
1135 it != bundles.end(); ++it) { | 1135 it != bundles.end(); ++it) { |
1136 web_app::ShortcutInfo shortcut_info = | 1136 web_app::ShortcutInfo shortcut_info = |
1137 BuildShortcutInfoFromBundle(*it); | 1137 BuildShortcutInfoFromBundle(*it); |
1138 WebAppShortcutCreator shortcut_creator( | 1138 WebAppShortcutCreator shortcut_creator( |
1139 it->DirName(), shortcut_info, extensions::FileHandlersInfo()); | 1139 it->DirName(), shortcut_info, extensions::FileHandlersInfo()); |
1140 shortcut_creator.DeleteShortcuts(); | 1140 shortcut_creator.DeleteShortcuts(); |
1141 } | 1141 } |
1142 } | 1142 } |
1143 | 1143 |
1144 void RevealAppShimInFinderForApp( | |
1145 Profile* profile, | |
1146 const base::FilePath& app_data_path) { | |
1147 web_app::ShortcutInfo shortcut_info = | |
1148 BuildShortcutInfoFromBundle(app_data_path); | |
jackhou1
2014/12/03 05:12:05
BuildShortcutInfoFromBundle actually reads the bun
mitchellj
2014/12/04 04:53:53
Done. When using web_app::ShortcutInfoForExtension
| |
1149 web_app::WebAppShortcutCreator shortcut_creator( | |
1150 app_data_path, shortcut_info, extensions::FileHandlersInfo()); | |
1151 shortcut_creator.RevealAppShimInFinder(); | |
1152 } | |
1153 | |
1144 } // namespace internals | 1154 } // namespace internals |
1145 | 1155 |
1146 } // namespace web_app | 1156 } // namespace web_app |
1147 | 1157 |
1148 namespace chrome { | 1158 namespace chrome { |
1149 | 1159 |
1150 void ShowCreateChromeAppShortcutsDialog( | 1160 void ShowCreateChromeAppShortcutsDialog( |
1151 gfx::NativeWindow /*parent_window*/, | 1161 gfx::NativeWindow /*parent_window*/, |
1152 Profile* profile, | 1162 Profile* profile, |
1153 const extensions::Extension* app, | 1163 const extensions::Extension* app, |
1154 const base::Callback<void(bool)>& close_callback) { | 1164 const base::Callback<void(bool)>& close_callback) { |
1155 web_app::GetShortcutInfoForApp( | 1165 web_app::GetShortcutInfoForApp( |
1156 app, | 1166 app, |
1157 profile, | 1167 profile, |
1158 base::Bind(&web_app::CreateAppShortcutInfoLoaded, | 1168 base::Bind(&web_app::CreateAppShortcutInfoLoaded, |
1159 profile, | 1169 profile, |
1160 app, | 1170 app, |
1161 close_callback)); | 1171 close_callback)); |
1162 } | 1172 } |
1163 | 1173 |
1164 } // namespace chrome | 1174 } // namespace chrome |
OLD | NEW |