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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 110 |
111 // Returns true if we're logged in and browser has been started | 111 // Returns true if we're logged in and browser has been started |
112 bool ChromeShellDelegate::IsSessionStarted() { | 112 bool ChromeShellDelegate::IsSessionStarted() { |
113 #if defined(OS_CHROMEOS) | 113 #if defined(OS_CHROMEOS) |
114 return chromeos::UserManager::Get()->IsSessionStarted(); | 114 return chromeos::UserManager::Get()->IsSessionStarted(); |
115 #else | 115 #else |
116 return true; | 116 return true; |
117 #endif | 117 #endif |
118 } | 118 } |
119 | 119 |
| 120 bool ChromeShellDelegate::IsFirstRunAfterBoot() { |
| 121 #if defined(OS_CHROMEOS) |
| 122 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot); |
| 123 #else |
| 124 return false; |
| 125 #endif |
| 126 } |
| 127 |
120 void ChromeShellDelegate::LockScreen() { | 128 void ChromeShellDelegate::LockScreen() { |
121 #if defined(OS_CHROMEOS) | 129 #if defined(OS_CHROMEOS) |
122 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && | 130 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && |
123 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { | 131 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { |
124 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> | 132 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> |
125 RequestLockScreen(); | 133 RequestLockScreen(); |
126 } | 134 } |
127 #endif | 135 #endif |
128 } | 136 } |
129 | 137 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 ash::Shell::GetInstance()->ShowLauncher(); | 429 ash::Shell::GetInstance()->ShowLauncher(); |
422 break; | 430 break; |
423 default: | 431 default: |
424 NOTREACHED() << "Unexpected notification " << type; | 432 NOTREACHED() << "Unexpected notification " << type; |
425 } | 433 } |
426 #else | 434 #else |
427 // MSVC++ warns about switch statements without any cases. | 435 // MSVC++ warns about switch statements without any cases. |
428 NOTREACHED() << "Unexpected notification " << type; | 436 NOTREACHED() << "Unexpected notification " << type; |
429 #endif | 437 #endif |
430 } | 438 } |
OLD | NEW |