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

Unified Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 32563004: [mac] Support adding the launcher to the Dock when Dashboard.app is present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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/mac/dock.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 098b432d0e834bd06496542c89c6ad131dbac433..bc4230dbbcee606bb77b34c45bdde77bb324f700 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -490,8 +490,18 @@ bool WebAppShortcutCreator::CreateShortcuts(
if (success_count != paths.size())
return false;
- if (creation_locations.in_quick_launch_bar && path_to_add_to_dock)
- dock::AddIcon(path_to_add_to_dock, nil);
+ if (creation_locations.in_quick_launch_bar && path_to_add_to_dock) {
+ switch (dock::AddIcon(path_to_add_to_dock, nil)) {
+ case dock::IconAddFailure:
+ // If adding the icon failed, instead reveal the Finder window.
+ RevealAppShimInFinder();
+ break;
+ case dock::IconAddSuccess:
+ case dock::IconAlreadyPresent:
+ break;
+ }
+ return true;
+ }
Nico 2013/10/23 00:21:11 I don't understand this part of the change. Why is
tapted 2013/10/23 00:59:24 Yeah - hopefully this UI flow can be avoided. Wit
if (creation_reason == SHORTCUT_CREATION_BY_USER)
RevealAppShimInFinder();
« no previous file with comments | « chrome/browser/mac/dock.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698