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

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

Issue 42153002: Merge 230360 "[mac] Support adding the launcher to the Dock when..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1650/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
===================================================================
--- chrome/browser/web_applications/web_app_mac.mm (revision 230849)
+++ chrome/browser/web_applications/web_app_mac.mm (working copy)
@@ -467,8 +467,18 @@
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;
+ }
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