Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 10889024: [cros] Initialize OOBE in parallel when boot animation is disabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return true; 97 return true;
98 } 98 }
99 99
100 return chromeos::UserManager::Get()->IsUserLoggedIn(); 100 return chromeos::UserManager::Get()->IsUserLoggedIn();
101 #else 101 #else
102 return true; 102 return true;
103 #endif 103 #endif
104 } 104 }
105 105
106 // Returns true if we're logged in and browser has been started 106 // Returns true if we're logged in and browser has been started
107 bool ChromeShellDelegate::IsSessionStarted() { 107 bool ChromeShellDelegate::IsSessionStarted() const {
108 #if defined(OS_CHROMEOS) 108 #if defined(OS_CHROMEOS)
109 return chromeos::UserManager::Get()->IsSessionStarted(); 109 return chromeos::UserManager::Get()->IsSessionStarted();
110 #else 110 #else
111 return true; 111 return true;
112 #endif 112 #endif
113 } 113 }
114 114
115 void ChromeShellDelegate::LockScreen() { 115 void ChromeShellDelegate::LockScreen() {
116 #if defined(OS_CHROMEOS) 116 #if defined(OS_CHROMEOS)
117 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && 117 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) &&
118 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) { 118 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled()) {
119 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 119 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
120 RequestLockScreen(); 120 RequestLockScreen();
121 } 121 }
122 #endif 122 #endif
123 } 123 }
124 124
125 bool ChromeShellDelegate::IsStatusAreaInitiallyVisible() const {
126 #if defined(OS_CHROMEOS)
127 // Login screen manages status area visibility by itself.
128 return IsSessionStarted();
129 #else
130 return true;
131 #endif
132 }
133
125 void ChromeShellDelegate::UnlockScreen() { 134 void ChromeShellDelegate::UnlockScreen() {
126 // This is used only for testing thus far. 135 // This is used only for testing thus far.
127 NOTIMPLEMENTED(); 136 NOTIMPLEMENTED();
128 } 137 }
129 138
130 bool ChromeShellDelegate::IsScreenLocked() const { 139 bool ChromeShellDelegate::IsScreenLocked() const {
131 #if defined(OS_CHROMEOS) 140 #if defined(OS_CHROMEOS)
132 if (!chromeos::ScreenLocker::default_screen_locker()) 141 if (!chromeos::ScreenLocker::default_screen_locker())
133 return false; 142 return false;
134 return chromeos::ScreenLocker::default_screen_locker()->locked(); 143 return chromeos::ScreenLocker::default_screen_locker()->locked();
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 ash::Shell::GetInstance()->ShowLauncher(); 384 ash::Shell::GetInstance()->ShowLauncher();
376 break; 385 break;
377 default: 386 default:
378 NOTREACHED() << "Unexpected notification " << type; 387 NOTREACHED() << "Unexpected notification " << type;
379 } 388 }
380 #else 389 #else
381 // MSVC++ warns about switch statements without any cases. 390 // MSVC++ warns about switch statements without any cases.
382 NOTREACHED() << "Unexpected notification " << type; 391 NOTREACHED() << "Unexpected notification " << type;
383 #endif 392 #endif
384 } 393 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698