OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 // Returns true if we're logged in and browser has been started | 113 // Returns true if we're logged in and browser has been started |
114 bool ChromeShellDelegate::IsSessionStarted() { | 114 bool ChromeShellDelegate::IsSessionStarted() { |
115 #if defined(OS_CHROMEOS) | 115 #if defined(OS_CHROMEOS) |
116 return chromeos::UserManager::Get()->IsSessionStarted(); | 116 return chromeos::UserManager::Get()->IsSessionStarted(); |
117 #else | 117 #else |
118 return true; | 118 return true; |
119 #endif | 119 #endif |
120 } | 120 } |
121 | 121 |
| 122 bool ChromeShellDelegate::IsFirstRunAfterBoot() { |
| 123 #if defined(OS_CHROMEOS) |
| 124 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot); |
| 125 #else |
| 126 return false; |
| 127 #endif |
| 128 } |
| 129 |
122 void ChromeShellDelegate::LockScreen() { | 130 void ChromeShellDelegate::LockScreen() { |
123 #if defined(OS_CHROMEOS) | 131 #if defined(OS_CHROMEOS) |
124 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && | 132 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && |
125 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { | 133 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { |
126 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 134 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
127 RequestLockScreen(); | 135 RequestLockScreen(); |
128 } | 136 } |
129 #endif | 137 #endif |
130 } | 138 } |
131 | 139 |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 ash::Shell::GetInstance()->ShowLauncher(); | 447 ash::Shell::GetInstance()->ShowLauncher(); |
440 break; | 448 break; |
441 default: | 449 default: |
442 NOTREACHED() << "Unexpected notification " << type; | 450 NOTREACHED() << "Unexpected notification " << type; |
443 } | 451 } |
444 #else | 452 #else |
445 // MSVC++ warns about switch statements without any cases. | 453 // MSVC++ warns about switch statements without any cases. |
446 NOTREACHED() << "Unexpected notification " << type; | 454 NOTREACHED() << "Unexpected notification " << type; |
447 #endif | 455 #endif |
448 } | 456 } |
OLD | NEW |