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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 | 390 |
391 if (!window_controller_) | 391 if (!window_controller_) |
392 window_controller_.reset([[AppListWindowController alloc] init]); | 392 window_controller_.reset([[AppListWindowController alloc] init]); |
393 | 393 |
394 scoped_ptr<app_list::AppListViewDelegate> delegate( | 394 scoped_ptr<app_list::AppListViewDelegate> delegate( |
395 new AppListViewDelegate(profile_, GetControllerDelegate())); | 395 new AppListViewDelegate(profile_, GetControllerDelegate())); |
396 [[window_controller_ appListViewController] setDelegate:delegate.Pass()]; | 396 [[window_controller_ appListViewController] setDelegate:delegate.Pass()]; |
397 } | 397 } |
398 | 398 |
399 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { | 399 void AppListServiceMac::ShowForProfile(Profile* requested_profile) { |
400 if (requested_profile->IsManaged()) | 400 if (requested_profile->IsSupervised()) |
401 return; | 401 return; |
402 | 402 |
403 InvalidatePendingProfileLoads(); | 403 InvalidatePendingProfileLoads(); |
404 | 404 |
405 if (requested_profile == profile_) { | 405 if (requested_profile == profile_) { |
406 ShowWindowNearDock(); | 406 ShowWindowNearDock(); |
407 return; | 407 return; |
408 } | 408 } |
409 | 409 |
410 SetProfilePath(requested_profile->GetPath()); | 410 SetProfilePath(requested_profile->GetPath()); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 | 595 |
596 - (void)animationDidEnd:(NSAnimation*)animation { | 596 - (void)animationDidEnd:(NSAnimation*)animation { |
597 content::BrowserThread::PostTask( | 597 content::BrowserThread::PostTask( |
598 content::BrowserThread::UI, | 598 content::BrowserThread::UI, |
599 FROM_HERE, | 599 FROM_HERE, |
600 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, | 600 base::Bind(&AppListServiceMac::WindowAnimationDidEnd, |
601 base::Unretained(AppListServiceMac::GetInstance()))); | 601 base::Unretained(AppListServiceMac::GetInstance()))); |
602 } | 602 } |
603 | 603 |
604 @end | 604 @end |
OLD | NEW |