| 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 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/magnifier_key_scroller.h" | 7 #include "ash/accelerators/magnifier_key_scroller.h" |
| 8 #include "ash/accelerators/spoken_feedback_toggler.h" | 8 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 9 #include "ash/accessibility_delegate.h" | 9 #include "ash/accessibility_delegate.h" |
| 10 #include "ash/wm/mru_window_tracker.h" | 10 #include "ash/wm/mru_window_tracker.h" |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 return chromeos::CreateUserWallpaperDelegate(); | 250 return chromeos::CreateUserWallpaperDelegate(); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void ChromeShellDelegate::Observe(int type, | 253 void ChromeShellDelegate::Observe(int type, |
| 254 const content::NotificationSource& source, | 254 const content::NotificationSource& source, |
| 255 const content::NotificationDetails& details) { | 255 const content::NotificationDetails& details) { |
| 256 switch (type) { | 256 switch (type) { |
| 257 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { | 257 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: { |
| 258 Profile* profile = content::Details<Profile>(details).ptr(); | 258 Profile* profile = content::Details<Profile>(details).ptr(); |
| 259 if (!chromeos::ProfileHelper::IsSigninProfile(profile) && | 259 if (!chromeos::ProfileHelper::IsSigninProfile(profile) && |
| 260 !profile->IsGuestSession() && !profile->IsManaged()) { | 260 !profile->IsGuestSession() && !profile->IsSupervised()) { |
| 261 // Start the error notifier services to show auth/sync notifications. | 261 // Start the error notifier services to show auth/sync notifications. |
| 262 SigninErrorNotifierFactory::GetForProfile(profile); | 262 SigninErrorNotifierFactory::GetForProfile(profile); |
| 263 SyncErrorNotifierFactory::GetForProfile(profile); | 263 SyncErrorNotifierFactory::GetForProfile(profile); |
| 264 } | 264 } |
| 265 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | 265 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
| 266 break; | 266 break; |
| 267 } | 267 } |
| 268 case chrome::NOTIFICATION_SESSION_STARTED: | 268 case chrome::NOTIFICATION_SESSION_STARTED: |
| 269 InitAfterSessionStart(); | 269 InitAfterSessionStart(); |
| 270 ash::Shell::GetInstance()->ShowShelf(); | 270 ash::Shell::GetInstance()->ShowShelf(); |
| 271 break; | 271 break; |
| 272 default: | 272 default: |
| 273 NOTREACHED() << "Unexpected notification " << type; | 273 NOTREACHED() << "Unexpected notification " << type; |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 void ChromeShellDelegate::PlatformInit() { | 277 void ChromeShellDelegate::PlatformInit() { |
| 278 registrar_.Add(this, | 278 registrar_.Add(this, |
| 279 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 279 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 280 content::NotificationService::AllSources()); | 280 content::NotificationService::AllSources()); |
| 281 registrar_.Add(this, | 281 registrar_.Add(this, |
| 282 chrome::NOTIFICATION_SESSION_STARTED, | 282 chrome::NOTIFICATION_SESSION_STARTED, |
| 283 content::NotificationService::AllSources()); | 283 content::NotificationService::AllSources()); |
| 284 } | 284 } |
| OLD | NEW |