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/wm/mru_window_tracker.h" | 8 #include "ash/wm/mru_window_tracker.h" |
9 #include "ash/wm/window_util.h" | 9 #include "ash/wm/window_util.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 extensions::MediaPlayerAPI::Get( | 204 extensions::MediaPlayerAPI::Get( |
205 ProfileManager::GetDefaultProfileOrOffTheRecord())-> | 205 ProfileManager::GetDefaultProfileOrOffTheRecord())-> |
206 media_player_event_router()->NotifyPrevTrack(); | 206 media_player_event_router()->NotifyPrevTrack(); |
207 } | 207 } |
208 | 208 |
209 void ChromeShellDelegate::Observe(int type, | 209 void ChromeShellDelegate::Observe(int type, |
210 const content::NotificationSource& source, | 210 const content::NotificationSource& source, |
211 const content::NotificationDetails& details) { | 211 const content::NotificationDetails& details) { |
212 switch (type) { | 212 switch (type) { |
213 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 213 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
214 ash::Shell::GetInstance()->CreateLauncher(); | 214 ash::Shell::GetInstance()->CreateLauncher(); |
oshima
2013/11/01 00:09:02
will it make sense to move CreateLauncher to OnLog
bshe
2013/11/12 15:28:33
Done.
| |
215 ash::Shell::GetInstance()->OnLoginUserProfilePrepared(); | |
215 break; | 216 break; |
216 case chrome::NOTIFICATION_SESSION_STARTED: | 217 case chrome::NOTIFICATION_SESSION_STARTED: |
217 RestoreFocus(); | 218 RestoreFocus(); |
218 ash::Shell::GetInstance()->ShowLauncher(); | 219 ash::Shell::GetInstance()->ShowLauncher(); |
219 break; | 220 break; |
220 default: | 221 default: |
221 NOTREACHED() << "Unexpected notification " << type; | 222 NOTREACHED() << "Unexpected notification " << type; |
222 } | 223 } |
223 } | 224 } |
224 | 225 |
225 void ChromeShellDelegate::PlatformInit() { | 226 void ChromeShellDelegate::PlatformInit() { |
226 registrar_.Add(this, | 227 registrar_.Add(this, |
227 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 228 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
228 content::NotificationService::AllSources()); | 229 content::NotificationService::AllSources()); |
229 registrar_.Add(this, | 230 registrar_.Add(this, |
230 chrome::NOTIFICATION_SESSION_STARTED, | 231 chrome::NOTIFICATION_SESSION_STARTED, |
231 content::NotificationService::AllSources()); | 232 content::NotificationService::AllSources()); |
232 } | 233 } |
OLD | NEW |