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

Side by Side Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 915973002: Add bookmark apps to taskbar automatically. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/web_applications/web_app_mac.h" 5 #import "chrome/browser/web_applications/web_app_mac.h"
6 6
7 #import <Carbon/Carbon.h> 7 #import <Carbon/Carbon.h>
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 extensions::ExtensionRegistry* registry = 1096 extensions::ExtensionRegistry* registry =
1097 extensions::ExtensionRegistry::Get(profile); 1097 extensions::ExtensionRegistry::Get(profile);
1098 if (!registry) 1098 if (!registry)
1099 return; 1099 return;
1100 1100
1101 // Update all apps. 1101 // Update all apps.
1102 scoped_ptr<extensions::ExtensionSet> everything = 1102 scoped_ptr<extensions::ExtensionSet> everything =
1103 registry->GenerateInstalledExtensionsSet(); 1103 registry->GenerateInstalledExtensionsSet();
1104 for (extensions::ExtensionSet::const_iterator it = everything->begin(); 1104 for (extensions::ExtensionSet::const_iterator it = everything->begin();
1105 it != everything->end(); ++it) { 1105 it != everything->end(); ++it) {
1106 if (web_app::ShouldCreateShortcutFor(profile, it->get())) 1106 if (web_app::ShouldCreateShortcutFor(SHORTCUT_CREATION_AUTOMATED, profile,
1107 it->get())) {
1107 web_app::UpdateAllShortcuts(base::string16(), profile, it->get()); 1108 web_app::UpdateAllShortcuts(base::string16(), profile, it->get());
1109 }
1108 } 1110 }
1109 1111
1110 callback.Run(); 1112 callback.Run();
1111 } 1113 }
1112 1114
1113 void RevealAppShimInFinderForApp(Profile* profile, 1115 void RevealAppShimInFinderForApp(Profile* profile,
1114 const extensions::Extension* app) { 1116 const extensions::Extension* app) {
1115 const web_app::ShortcutInfo shortcut_info = 1117 const web_app::ShortcutInfo shortcut_info =
1116 ShortcutInfoForExtensionAndProfile(app, profile); 1118 ShortcutInfoForExtensionAndProfile(app, profile);
1117 content::BrowserThread::PostTask( 1119 content::BrowserThread::PostTask(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
1190 web_app::GetShortcutInfoForApp( 1192 web_app::GetShortcutInfoForApp(
1191 app, 1193 app,
1192 profile, 1194 profile,
1193 base::Bind(&web_app::CreateAppShortcutInfoLoaded, 1195 base::Bind(&web_app::CreateAppShortcutInfoLoaded,
1194 profile, 1196 profile,
1195 app, 1197 app,
1196 close_callback)); 1198 close_callback));
1197 } 1199 }
1198 1200
1199 } // namespace chrome 1201 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698