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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 init_called = true; | 364 init_called = true; |
365 apps::AppShimHandler::RegisterHandler(app_mode::kAppListModeId, | 365 apps::AppShimHandler::RegisterHandler(app_mode::kAppListModeId, |
366 AppListServiceMac::GetInstance()); | 366 AppListServiceMac::GetInstance()); |
367 | 367 |
368 // Handle the case where Chrome was not running and was started with the app | 368 // Handle the case where Chrome was not running and was started with the app |
369 // launcher shim. The profile has not yet been loaded. To improve response | 369 // launcher shim. The profile has not yet been loaded. To improve response |
370 // times, start animating an empty window which will be populated via | 370 // times, start animating an empty window which will be populated via |
371 // OnShimLaunch(). Note that if --silent-launch is not also passed, the window | 371 // OnShimLaunch(). Note that if --silent-launch is not also passed, the window |
372 // will instead populate via StartupBrowserCreator::Launch(). Shim-initiated | 372 // will instead populate via StartupBrowserCreator::Launch(). Shim-initiated |
373 // launches will always have --silent-launch. | 373 // launches will always have --silent-launch. |
374 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList)) | 374 if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kShowAppList)) |
375 ShowWindowNearDock(); | 375 ShowWindowNearDock(); |
376 } | 376 } |
377 | 377 |
378 Profile* AppListServiceMac::GetCurrentAppListProfile() { | 378 Profile* AppListServiceMac::GetCurrentAppListProfile() { |
379 return profile_; | 379 return profile_; |
380 } | 380 } |
381 | 381 |
382 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { | 382 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { |
383 CreateForProfile(requested_profile); | 383 CreateForProfile(requested_profile); |
384 ShowWindowNearDock(); | 384 ShowWindowNearDock(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 - (void)animationDidEnd:(NSAnimation*)animation { | 597 - (void)animationDidEnd:(NSAnimation*)animation { |
598 content::BrowserThread::PostTask( | 598 content::BrowserThread::PostTask( |
599 content::BrowserThread::UI, | 599 content::BrowserThread::UI, |
600 FROM_HERE, | 600 FROM_HERE, |
601 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, | 601 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, |
602 base::Unretained(AppListServiceMac::GetInstance()))); | 602 base::Unretained(AppListServiceMac::GetInstance()))); |
603 } | 603 } |
604 | 604 |
605 @end | 605 @end |
OLD | NEW |