OLD | NEW |
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 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 content::BrowserThread::PostTask( | 285 content::BrowserThread::PostTask( |
286 content::BrowserThread::FILE, FROM_HERE, | 286 content::BrowserThread::FILE, FROM_HERE, |
287 base::Bind(&UpdateAndLaunchShimOnFileThread, base::Passed(&shortcut_info), | 287 base::Bind(&UpdateAndLaunchShimOnFileThread, base::Passed(&shortcut_info), |
288 file_handlers_info)); | 288 file_handlers_info)); |
289 } | 289 } |
290 | 290 |
291 void RebuildAppAndLaunch(scoped_ptr<web_app::ShortcutInfo> shortcut_info) { | 291 void RebuildAppAndLaunch(scoped_ptr<web_app::ShortcutInfo> shortcut_info) { |
292 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 292 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
293 if (shortcut_info->extension_id == app_mode::kAppListModeId) { | 293 if (shortcut_info->extension_id == app_mode::kAppListModeId) { |
294 AppListService* app_list_service = | 294 AppListService* app_list_service = |
295 AppListService::Get(chrome::HOST_DESKTOP_TYPE_NATIVE); | 295 AppListService::Get(ui::HOST_DESKTOP_TYPE_NATIVE); |
296 app_list_service->CreateShortcut(); | 296 app_list_service->CreateShortcut(); |
297 app_list_service->Show(); | 297 app_list_service->Show(); |
298 return; | 298 return; |
299 } | 299 } |
300 | 300 |
301 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 301 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
302 Profile* profile = | 302 Profile* profile = |
303 profile_manager->GetProfileByPath(shortcut_info->profile_path); | 303 profile_manager->GetProfileByPath(shortcut_info->profile_path); |
304 if (!profile || !profile_manager->IsValidProfile(profile)) | 304 if (!profile || !profile_manager->IsValidProfile(profile)) |
305 return; | 305 return; |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1222 web_app::GetShortcutInfoForApp( | 1222 web_app::GetShortcutInfoForApp( |
1223 app, | 1223 app, |
1224 profile, | 1224 profile, |
1225 base::Bind(&web_app::CreateAppShortcutInfoLoaded, | 1225 base::Bind(&web_app::CreateAppShortcutInfoLoaded, |
1226 profile, | 1226 profile, |
1227 app, | 1227 app, |
1228 close_callback)); | 1228 close_callback)); |
1229 } | 1229 } |
1230 | 1230 |
1231 } // namespace chrome | 1231 } // namespace chrome |
OLD | NEW |