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

Unified Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 11881045: Implement 'Create Shortcuts' menu item on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 years, 11 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/resources/ntp4/apps_page.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/browser_window_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
index e09901bea8e488d530f95b9f3626b372bf343841..0f68dab4a7a65bc3264ef8a76a2d65786443a2bc 100644
--- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm
+++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm
@@ -16,6 +16,7 @@
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/shell_integration.h"
#include "chrome/browser/ui/bookmarks/bookmark_utils.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_command_controller.h"
@@ -42,6 +43,8 @@
#import "chrome/browser/ui/cocoa/web_dialog_window_controller.h"
#import "chrome/browser/ui/cocoa/website_settings_bubble_controller.h"
#include "chrome/browser/ui/page_info_bubble.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/pref_names.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -565,7 +568,11 @@ void BrowserWindowCocoa::HandleKeyboardEvent(
void BrowserWindowCocoa::ShowCreateChromeAppShortcutsDialog(
Profile* profile, const extensions::Extension* app) {
- NOTIMPLEMENTED();
+ // 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.
+ ShellIntegration::ShortcutInfo shortcut_info;
+ web_app::UpdateShortcutInfoForApp(*app, profile, &shortcut_info);
+ web_app::CreateShortcuts(shortcut_info);
}
void BrowserWindowCocoa::Cut() {
« no previous file with comments | « chrome/browser/resources/ntp4/apps_page.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698