| Index: apps/shortcut_manager.cc
|
| diff --git a/chrome/browser/extensions/app_shortcut_manager.cc b/apps/shortcut_manager.cc
|
| similarity index 73%
|
| rename from chrome/browser/extensions/app_shortcut_manager.cc
|
| rename to apps/shortcut_manager.cc
|
| index 219894b1155a7f0e89f0448934647a68e793cc0b..8a539a888846c01c53817e508cc96e5ea22c449c 100644
|
| --- a/chrome/browser/extensions/app_shortcut_manager.cc
|
| +++ b/apps/shortcut_manager.cc
|
| @@ -2,29 +2,23 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/extensions/app_shortcut_manager.h"
|
| +#include "apps/shortcut_manager.h"
|
|
|
| #include "base/bind.h"
|
| -#include "base/command_line.h"
|
| #include "base/compiler_specific.h"
|
| -#include "base/logging.h"
|
| -#include "base/utf_string_conversions.h"
|
| -#include "chrome/browser/extensions/image_loader.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/ui/web_applications/web_app_ui.h"
|
| #include "chrome/browser/web_applications/web_app.h"
|
| #include "chrome/common/chrome_notification_types.h"
|
| #include "chrome/common/chrome_switches.h"
|
| -#include "chrome/common/extensions/extension_resource.h"
|
| #include "content/public/browser/notification_details.h"
|
| #include "content/public/browser/notification_source.h"
|
| -#include "grit/theme_resources.h"
|
| -#include "skia/ext/image_operations.h"
|
| -#include "ui/base/resource/resource_bundle.h"
|
|
|
| -namespace extensions {
|
| +using extensions::Extension;
|
|
|
| -AppShortcutManager::AppShortcutManager(Profile* profile)
|
| +namespace apps {
|
| +
|
| +ShortcutManager::ShortcutManager(Profile* profile)
|
| : profile_(profile),
|
| ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
|
| registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
|
| @@ -33,9 +27,9 @@ AppShortcutManager::AppShortcutManager(Profile* profile)
|
| content::Source<Profile>(profile_));
|
| }
|
|
|
| -AppShortcutManager::~AppShortcutManager() {}
|
| +ShortcutManager::~ShortcutManager() {}
|
|
|
| -void AppShortcutManager::Observe(int type,
|
| +void ShortcutManager::Observe(int type,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) {
|
| switch (type) {
|
| @@ -44,7 +38,7 @@ void AppShortcutManager::Observe(int type,
|
| const Extension* extension = content::Details<const Extension>(
|
| details).ptr();
|
| if (extension->is_platform_app() &&
|
| - extension->location() != Manifest::COMPONENT) {
|
| + extension->location() != extensions::Manifest::COMPONENT) {
|
| web_app::UpdateShortcutInfoAndIconForApp(*extension, profile_,
|
| base::Bind(&web_app::UpdateAllShortcuts));
|
| }
|
| @@ -62,11 +56,11 @@ void AppShortcutManager::Observe(int type,
|
| }
|
| }
|
|
|
| -void AppShortcutManager::DeleteApplicationShortcuts(
|
| +void ShortcutManager::DeleteApplicationShortcuts(
|
| const Extension* extension) {
|
| ShellIntegration::ShortcutInfo delete_info =
|
| web_app::ShortcutInfoForExtensionAndProfile(extension, profile_);
|
| web_app::DeleteAllShortcuts(delete_info);
|
| }
|
|
|
| -} // namespace extensions
|
| +} // namespace apps
|
|
|