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 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 if (shelf_delegate_) | 543 if (shelf_delegate_) |
544 shelf_delegate_->OnUserProfileReadyToSwitch(profile); | 544 shelf_delegate_->OnUserProfileReadyToSwitch(profile); |
545 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | 545 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
546 break; | 546 break; |
547 } | 547 } |
548 case chrome::NOTIFICATION_SESSION_STARTED: | 548 case chrome::NOTIFICATION_SESSION_STARTED: |
549 // InitAfterFirstSessionStart() should only be called once upon system | 549 // InitAfterFirstSessionStart() should only be called once upon system |
550 // start. | 550 // start. |
551 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2) | 551 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() < 2) |
552 InitAfterFirstSessionStart(); | 552 InitAfterFirstSessionStart(); |
553 ash::Shell::GetInstance()->ShowShelf(); | 553 ash::WmShell::Get()->ShowShelf(); |
554 break; | 554 break; |
555 default: | 555 default: |
556 NOTREACHED() << "Unexpected notification " << type; | 556 NOTREACHED() << "Unexpected notification " << type; |
557 } | 557 } |
558 } | 558 } |
559 | 559 |
560 void ChromeShellDelegate::PlatformInit() { | 560 void ChromeShellDelegate::PlatformInit() { |
561 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 561 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
562 content::NotificationService::AllSources()); | 562 content::NotificationService::AllSources()); |
563 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 563 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
564 content::NotificationService::AllSources()); | 564 content::NotificationService::AllSources()); |
565 } | 565 } |
OLD | NEW |