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

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

Issue 14139003: Chrome OS multi-profiles backend and UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 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/keyboard_overlay/keyboard_overlay_view.h" 7 #include "ash/keyboard_overlay/keyboard_overlay_view.h"
8 #include "ash/system/chromeos/network/network_observer.h" 8 #include "ash/system/chromeos/network/network_observer.h"
9 #include "ash/system/tray/system_tray_notifier.h" 9 #include "ash/system/tray/system_tray_notifier.h"
10 #include "ash/wm/window_util.h" 10 #include "ash/wm/window_util.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 bool ChromeShellDelegate::IsGuestSession() const { 71 bool ChromeShellDelegate::IsGuestSession() const {
72 return CommandLine::ForCurrentProcess()->HasSwitch( 72 return CommandLine::ForCurrentProcess()->HasSwitch(
73 chromeos::switches::kGuestSession); 73 chromeos::switches::kGuestSession);
74 } 74 }
75 75
76 bool ChromeShellDelegate::IsFirstRunAfterBoot() const { 76 bool ChromeShellDelegate::IsFirstRunAfterBoot() const {
77 return CommandLine::ForCurrentProcess()->HasSwitch( 77 return CommandLine::ForCurrentProcess()->HasSwitch(
78 chromeos::switches::kFirstBoot); 78 chromeos::switches::kFirstBoot);
79 } 79 }
80 80
81 bool ChromeShellDelegate::IsMultiProfilesEnabled() const {
82 return CommandLine::ForCurrentProcess()->HasSwitch(switches::kMultiProfiles);
83 }
84
81 bool ChromeShellDelegate::CanLockScreen() const { 85 bool ChromeShellDelegate::CanLockScreen() const {
82 return chromeos::UserManager::Get()->CanCurrentUserLock(); 86 return chromeos::UserManager::Get()->CanCurrentUserLock();
83 } 87 }
84 88
85 void ChromeShellDelegate::LockScreen() { 89 void ChromeShellDelegate::LockScreen() {
86 if (CanLockScreen()) { 90 if (CanLockScreen()) {
87 // TODO(antrim) : additional logging for crbug/173178 91 // TODO(antrim) : additional logging for crbug/173178
88 LOG(WARNING) << "Requesting screen lock from ChromeShellDelegate"; 92 LOG(WARNING) << "Requesting screen lock from ChromeShellDelegate";
89 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()-> 93 chromeos::DBusThreadManager::Get()->GetSessionManagerClient()->
90 RequestLockScreen(); 94 RequestLockScreen();
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 305 }
302 306
303 void ChromeShellDelegate::PlatformInit() { 307 void ChromeShellDelegate::PlatformInit() {
304 registrar_.Add(this, 308 registrar_.Add(this,
305 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 309 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
306 content::NotificationService::AllSources()); 310 content::NotificationService::AllSources());
307 registrar_.Add(this, 311 registrar_.Add(this,
308 chrome::NOTIFICATION_SESSION_STARTED, 312 chrome::NOTIFICATION_SESSION_STARTED,
309 content::NotificationService::AllSources()); 313 content::NotificationService::AllSources());
310 } 314 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698