Chromium Code Reviews| 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 210 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 211 chromeos::switches::kFirstExecAfterBoot); | 211 chromeos::switches::kFirstExecAfterBoot); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void ChromeShellDelegate::PreInit() { | 214 void ChromeShellDelegate::PreInit() { |
| 215 chromeos::LoadDisplayPreferences(IsFirstRunAfterBoot()); | 215 chromeos::LoadDisplayPreferences(IsFirstRunAfterBoot()); |
| 216 // Set the observer now so that we can save the initial state | 216 // Set the observer now so that we can save the initial state |
| 217 // in Shell::Init. | 217 // in Shell::Init. |
| 218 display_configuration_observer_.reset( | 218 display_configuration_observer_.reset( |
| 219 new chromeos::DisplayConfigurationObserver()); | 219 new chromeos::DisplayConfigurationObserver()); |
| 220 | |
| 221 user_metrics_recorder_proxy_.reset(new ash::UserMetricsRecorderProxy); | |
| 220 } | 222 } |
| 221 | 223 |
| 222 void ChromeShellDelegate::PreShutdown() { | 224 void ChromeShellDelegate::PreShutdown() { |
| 223 display_configuration_observer_.reset(); | 225 display_configuration_observer_.reset(); |
| 226 user_metrics_recorder_proxy_.reset(); | |
|
bruthig
2015/05/15 19:11:27
oshima@, is it safe to assume that all Browser's h
| |
| 224 } | 227 } |
| 225 | 228 |
| 226 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { | 229 ash::SessionStateDelegate* ChromeShellDelegate::CreateSessionStateDelegate() { |
| 227 return new SessionStateDelegateChromeos; | 230 return new SessionStateDelegateChromeos; |
| 228 } | 231 } |
| 229 | 232 |
| 230 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { | 233 ash::AccessibilityDelegate* ChromeShellDelegate::CreateAccessibilityDelegate() { |
| 231 return new AccessibilityDelegateImpl; | 234 return new AccessibilityDelegateImpl; |
| 232 } | 235 } |
| 233 | 236 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 275 } | 278 } |
| 276 | 279 |
| 277 void ChromeShellDelegate::PlatformInit() { | 280 void ChromeShellDelegate::PlatformInit() { |
| 278 registrar_.Add(this, | 281 registrar_.Add(this, |
| 279 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 282 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 280 content::NotificationService::AllSources()); | 283 content::NotificationService::AllSources()); |
| 281 registrar_.Add(this, | 284 registrar_.Add(this, |
| 282 chrome::NOTIFICATION_SESSION_STARTED, | 285 chrome::NOTIFICATION_SESSION_STARTED, |
| 283 content::NotificationService::AllSources()); | 286 content::NotificationService::AllSources()); |
| 284 } | 287 } |
| OLD | NEW |