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

Unified Diff: chrome/browser/extensions/app_shortcut_manager.cc

Issue 9346013: Publish app shortcuts on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win build Created 8 years, 10 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
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/shell_integration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/app_shortcut_manager.cc
diff --git a/chrome/browser/extensions/app_shortcut_manager.cc b/chrome/browser/extensions/app_shortcut_manager.cc
index 187845f66c6e7b8a9348f6ef4f5fc2fac1e8a4e5..33ccb06b1118ab679a7b0c0c875735c4ff47d854 100644
--- a/chrome/browser/extensions/app_shortcut_manager.cc
+++ b/chrome/browser/extensions/app_shortcut_manager.cc
@@ -4,11 +4,13 @@
#include "chrome/browser/extensions/app_shortcut_manager.h"
+#include "base/command_line.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/webui/extensions/extension_icon_source.h"
#include "chrome/browser/profiles/profile.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"
@@ -55,7 +57,14 @@ void AppShortcutManager::SetShortcutCreationDisabledForTesting(bool disabled) {
void AppShortcutManager::InstallApplicationShortcuts(
const Extension* extension) {
-#if !defined(OS_MACOSX)
+#if defined(OS_MACOSX)
+ // TODO(sail): For now only install shortcuts if enable platform apps is true.
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnablePlatformApps)) {
+ return;
+ }
+#endif
+
const int kAppIconSize = 32;
shortcut_info_.extension_id = extension->id();
@@ -91,5 +100,4 @@ void AppShortcutManager::InstallApplicationShortcuts(
icon_resource,
max_size,
ImageLoadingTracker::DONT_CACHE);
-#endif
}
« no previous file with comments | « chrome/browser/app_controller_mac.mm ('k') | chrome/browser/shell_integration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698