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/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/media_delegate.h" | 8 #include "ash/media_delegate.h" |
9 #include "ash/wm/mru_window_tracker.h" | 9 #include "ash/wm/mru_window_tracker.h" |
10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 218 |
219 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { | 219 ash::UserWallpaperDelegate* ChromeShellDelegate::CreateUserWallpaperDelegate() { |
220 return chromeos::CreateUserWallpaperDelegate(); | 220 return chromeos::CreateUserWallpaperDelegate(); |
221 } | 221 } |
222 | 222 |
223 void ChromeShellDelegate::Observe(int type, | 223 void ChromeShellDelegate::Observe(int type, |
224 const content::NotificationSource& source, | 224 const content::NotificationSource& source, |
225 const content::NotificationDetails& details) { | 225 const content::NotificationDetails& details) { |
226 switch (type) { | 226 switch (type) { |
227 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 227 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
228 ash::Shell::GetInstance()->CreateLauncher(); | 228 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
229 break; | 229 break; |
230 case chrome::NOTIFICATION_SESSION_STARTED: | 230 case chrome::NOTIFICATION_SESSION_STARTED: |
231 RestoreFocus(); | 231 RestoreFocus(); |
232 ash::Shell::GetInstance()->ShowLauncher(); | 232 ash::Shell::GetInstance()->ShowLauncher(); |
233 break; | 233 break; |
234 default: | 234 default: |
235 NOTREACHED() << "Unexpected notification " << type; | 235 NOTREACHED() << "Unexpected notification " << type; |
236 } | 236 } |
237 } | 237 } |
238 | 238 |
239 void ChromeShellDelegate::PlatformInit() { | 239 void ChromeShellDelegate::PlatformInit() { |
240 registrar_.Add(this, | 240 registrar_.Add(this, |
241 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 241 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
242 content::NotificationService::AllSources()); | 242 content::NotificationService::AllSources()); |
243 registrar_.Add(this, | 243 registrar_.Add(this, |
244 chrome::NOTIFICATION_SESSION_STARTED, | 244 chrome::NOTIFICATION_SESSION_STARTED, |
245 content::NotificationService::AllSources()); | 245 content::NotificationService::AllSources()); |
246 } | 246 } |
OLD | NEW |