| 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 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 385 |
| 386 void AppListServiceMac::CreateForProfile(Profile* requested_profile) { | 386 void AppListServiceMac::CreateForProfile(Profile* requested_profile) { |
| 387 if (profile_ == requested_profile) | 387 if (profile_ == requested_profile) |
| 388 return; | 388 return; |
| 389 | 389 |
| 390 profile_ = requested_profile; | 390 profile_ = requested_profile; |
| 391 | 391 |
| 392 if (!window_controller_) | 392 if (!window_controller_) |
| 393 window_controller_.reset([[AppListWindowController alloc] init]); | 393 window_controller_.reset([[AppListWindowController alloc] init]); |
| 394 | 394 |
| 395 [[window_controller_ appListViewController] setDelegate:nil]; |
| 395 [[window_controller_ appListViewController] | 396 [[window_controller_ appListViewController] |
| 396 setDelegate:GetViewDelegate(profile_)]; | 397 setDelegate:GetViewDelegate(profile_)]; |
| 397 } | 398 } |
| 398 | 399 |
| 399 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { | 400 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { |
| 400 InvalidatePendingProfileLoads(); | 401 InvalidatePendingProfileLoads(); |
| 401 | 402 |
| 402 if (requested_profile == profile_) { | 403 if (requested_profile == profile_) { |
| 403 ShowWindowNearDock(); | 404 ShowWindowNearDock(); |
| 404 return; | 405 return; |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 | 603 |
| 603 - (void)animationDidEnd:(NSAnimation*)animation { | 604 - (void)animationDidEnd:(NSAnimation*)animation { |
| 604 content::BrowserThread::PostTask( | 605 content::BrowserThread::PostTask( |
| 605 content::BrowserThread::UI, | 606 content::BrowserThread::UI, |
| 606 FROM_HERE, | 607 FROM_HERE, |
| 607 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, | 608 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, |
| 608 base::Unretained(AppListServiceMac::GetInstance()))); | 609 base::Unretained(AppListServiceMac::GetInstance()))); |
| 609 } | 610 } |
| 610 | 611 |
| 611 @end | 612 @end |
| OLD | NEW |