| 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 28ad88595f88bd172c1e6aa39cea7c75f0d00c64..b5241c82e469eedf5ad169646296534f2a6332f2 100644
|
| --- a/chrome/browser/web_applications/web_app_mac.mm
|
| +++ b/chrome/browser/web_applications/web_app_mac.mm
|
| @@ -26,6 +26,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #import "chrome/browser/mac/dock.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/shell_integration.h"
|
| #include "chrome/common/chrome_constants.h"
|
| #include "chrome/common/chrome_paths.h"
|
| #include "chrome/common/chrome_switches.h"
|
| @@ -203,7 +204,7 @@ bool HasSameUserDataDir(const base::FilePath& bundle_path) {
|
| }
|
|
|
| void LaunchShimOnFileThread(
|
| - const ShellIntegration::ShortcutInfo& shortcut_info) {
|
| + const web_app::ShortcutInfo& shortcut_info) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
|
| base::FilePath shim_path = web_app::GetAppInstallPath(shortcut_info);
|
|
|
| @@ -388,11 +389,11 @@ std::vector<base::FilePath> GetAllAppBundlesInPath(
|
| return bundle_paths;
|
| }
|
|
|
| -ShellIntegration::ShortcutInfo BuildShortcutInfoFromBundle(
|
| +web_app::ShortcutInfo BuildShortcutInfoFromBundle(
|
| const base::FilePath& bundle_path) {
|
| NSDictionary* plist = ReadPlist(GetPlistPath(bundle_path));
|
|
|
| - ShellIntegration::ShortcutInfo shortcut_info;
|
| + web_app::ShortcutInfo shortcut_info;
|
| shortcut_info.extension_id = base::SysNSStringToUTF8(
|
| [plist valueForKey:app_mode::kCrAppModeShortcutIDKey]);
|
| shortcut_info.is_platform_app = true;
|
| @@ -428,7 +429,7 @@ void ShowCreateChromeAppShortcutsDialog(gfx::NativeWindow /*parent_window*/,
|
| // Normally we would show a dialog, but since we always create the app
|
| // shortcut in ~/Applications there are no options for the user to choose.
|
| web_app::CreateShortcuts(web_app::SHORTCUT_CREATION_BY_USER,
|
| - ShellIntegration::ShortcutLocations(),
|
| + web_app::ShortcutLocations(),
|
| profile,
|
| app);
|
| if (!close_callback.is_null())
|
| @@ -441,7 +442,7 @@ namespace web_app {
|
|
|
| WebAppShortcutCreator::WebAppShortcutCreator(
|
| const base::FilePath& app_data_dir,
|
| - const ShellIntegration::ShortcutInfo& shortcut_info)
|
| + const web_app::ShortcutInfo& shortcut_info)
|
| : app_data_dir_(app_data_dir),
|
| info_(shortcut_info) {}
|
|
|
| @@ -521,7 +522,7 @@ size_t WebAppShortcutCreator::CreateShortcutsIn(
|
|
|
| bool WebAppShortcutCreator::CreateShortcuts(
|
| ShortcutCreationReason creation_reason,
|
| - ShellIntegration::ShortcutLocations creation_locations) {
|
| + web_app::ShortcutLocations creation_locations) {
|
| const base::FilePath applications_dir = GetApplicationsDirname();
|
| if (applications_dir.empty() ||
|
| !base::DirectoryExists(applications_dir.DirName())) {
|
| @@ -794,12 +795,12 @@ void WebAppShortcutCreator::RevealAppShimInFinder() const {
|
| }
|
|
|
| base::FilePath GetAppInstallPath(
|
| - const ShellIntegration::ShortcutInfo& shortcut_info) {
|
| + const web_app::ShortcutInfo& shortcut_info) {
|
| WebAppShortcutCreator shortcut_creator(base::FilePath(), shortcut_info);
|
| return shortcut_creator.GetApplicationsShortcutPath();
|
| }
|
|
|
| -void MaybeLaunchShortcut(const ShellIntegration::ShortcutInfo& shortcut_info) {
|
| +void MaybeLaunchShortcut(const web_app::ShortcutInfo& shortcut_info) {
|
| if (!apps::IsAppShimsEnabled())
|
| return;
|
|
|
| @@ -812,9 +813,9 @@ namespace internals {
|
|
|
| bool CreatePlatformShortcuts(
|
| const base::FilePath& app_data_path,
|
| - const ShellIntegration::ShortcutInfo& shortcut_info,
|
| + const web_app::ShortcutInfo& shortcut_info,
|
| const extensions::FileHandlersInfo& file_handlers_info,
|
| - const ShellIntegration::ShortcutLocations& creation_locations,
|
| + const web_app::ShortcutLocations& creation_locations,
|
| ShortcutCreationReason creation_reason) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
|
| WebAppShortcutCreator shortcut_creator(app_data_path, shortcut_info);
|
| @@ -823,7 +824,7 @@ bool CreatePlatformShortcuts(
|
|
|
| void DeletePlatformShortcuts(
|
| const base::FilePath& app_data_path,
|
| - const ShellIntegration::ShortcutInfo& shortcut_info) {
|
| + const web_app::ShortcutInfo& shortcut_info) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
|
| WebAppShortcutCreator shortcut_creator(app_data_path, shortcut_info);
|
| shortcut_creator.DeleteShortcuts();
|
| @@ -832,7 +833,7 @@ void DeletePlatformShortcuts(
|
| void UpdatePlatformShortcuts(
|
| const base::FilePath& app_data_path,
|
| const base::string16& old_app_title,
|
| - const ShellIntegration::ShortcutInfo& shortcut_info,
|
| + const web_app::ShortcutInfo& shortcut_info,
|
| const extensions::FileHandlersInfo& file_handlers_info) {
|
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
|
| WebAppShortcutCreator shortcut_creator(app_data_path, shortcut_info);
|
| @@ -846,7 +847,7 @@ void DeleteAllShortcutsForProfile(const base::FilePath& profile_path) {
|
|
|
| for (std::vector<base::FilePath>::const_iterator it = bundles.begin();
|
| it != bundles.end(); ++it) {
|
| - ShellIntegration::ShortcutInfo shortcut_info =
|
| + web_app::ShortcutInfo shortcut_info =
|
| BuildShortcutInfoFromBundle(*it);
|
| WebAppShortcutCreator shortcut_creator(it->DirName(), shortcut_info);
|
| shortcut_creator.DeleteShortcuts();
|
|
|