| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 | 251 |
| 252 void ChromeShellDelegate::Observe(int type, | 252 void ChromeShellDelegate::Observe(int type, |
| 253 const content::NotificationSource& source, | 253 const content::NotificationSource& source, |
| 254 const content::NotificationDetails& details) { | 254 const content::NotificationDetails& details) { |
| 255 switch (type) { | 255 switch (type) { |
| 256 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 256 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
| 257 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | 257 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); |
| 258 break; | 258 break; |
| 259 case chrome::NOTIFICATION_SESSION_STARTED: | 259 case chrome::NOTIFICATION_SESSION_STARTED: |
| 260 RestoreFocus(); | 260 RestoreFocus(); |
| 261 ash::Shell::GetInstance()->ShowLauncher(); | 261 ash::Shell::GetInstance()->ShowShelf(); |
| 262 break; | 262 break; |
| 263 default: | 263 default: |
| 264 NOTREACHED() << "Unexpected notification " << type; | 264 NOTREACHED() << "Unexpected notification " << type; |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 | 267 |
| 268 void ChromeShellDelegate::PlatformInit() { | 268 void ChromeShellDelegate::PlatformInit() { |
| 269 registrar_.Add(this, | 269 registrar_.Add(this, |
| 270 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 270 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 271 content::NotificationService::AllSources()); | 271 content::NotificationService::AllSources()); |
| 272 registrar_.Add(this, | 272 registrar_.Add(this, |
| 273 chrome::NOTIFICATION_SESSION_STARTED, | 273 chrome::NOTIFICATION_SESSION_STARTED, |
| 274 content::NotificationService::AllSources()); | 274 content::NotificationService::AllSources()); |
| 275 } | 275 } |
| OLD | NEW |