OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/ui/app_list/app_list_service_mac.h" | 5 #import "chrome/browser/ui/app_list/app_list_service_mac.h" |
6 | 6 |
7 #include <ApplicationServices/ApplicationServices.h> | 7 #include <ApplicationServices/ApplicationServices.h> |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 int installed_version = | 143 int installed_version = |
144 local_state->GetInteger(prefs::kAppLauncherShortcutVersion); | 144 local_state->GetInteger(prefs::kAppLauncherShortcutVersion); |
145 | 145 |
146 // If this is a first-time install, add a dock icon. Otherwise just update | 146 // If this is a first-time install, add a dock icon. Otherwise just update |
147 // the target, and wait for OSX to refresh its icon caches. This might not | 147 // the target, and wait for OSX to refresh its icon caches. This might not |
148 // occur until a reboot, but OSX does not offer a nicer way. Deleting cache | 148 // occur until a reboot, but OSX does not offer a nicer way. Deleting cache |
149 // files on disk and killing processes can easily result in icon corruption. | 149 // files on disk and killing processes can easily result in icon corruption. |
150 if (installed_version == 0) | 150 if (installed_version == 0) |
151 shortcut_locations.in_quick_launch_bar = true; | 151 shortcut_locations.in_quick_launch_bar = true; |
152 | 152 |
153 web_app::CreateNonAppShortcut(shortcut_locations, shortcut_info); | 153 web_app::CreateNonAppShortcut(web_app::SHORTCUT_CREATION_AUTOMATED, |
| 154 shortcut_locations, shortcut_info, |
| 155 extensions::FileHandlersInfo()); |
154 | 156 |
155 local_state->SetInteger(prefs::kAppLauncherShortcutVersion, | 157 local_state->SetInteger(prefs::kAppLauncherShortcutVersion, |
156 kShortcutVersion); | 158 kShortcutVersion); |
157 } | 159 } |
158 | 160 |
159 NSRunningApplication* ActiveApplicationNotChrome() { | 161 NSRunningApplication* ActiveApplicationNotChrome() { |
160 NSArray* applications = [[NSWorkspace sharedWorkspace] runningApplications]; | 162 NSArray* applications = [[NSWorkspace sharedWorkspace] runningApplications]; |
161 for (NSRunningApplication* application in applications) { | 163 for (NSRunningApplication* application in applications) { |
162 if (![application isActive]) | 164 if (![application isActive]) |
163 continue; | 165 continue; |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 | 599 |
598 - (void)animationDidEnd:(NSAnimation*)animation { | 600 - (void)animationDidEnd:(NSAnimation*)animation { |
599 content::BrowserThread::PostTask( | 601 content::BrowserThread::PostTask( |
600 content::BrowserThread::UI, | 602 content::BrowserThread::UI, |
601 FROM_HERE, | 603 FROM_HERE, |
602 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, | 604 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, |
603 base::Unretained(AppListServiceMac::GetInstance()))); | 605 base::Unretained(AppListServiceMac::GetInstance()))); |
604 } | 606 } |
605 | 607 |
606 @end | 608 @end |
OLD | NEW |