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

Side by Side Diff: ash/shell/shell_delegate_impl.cc

Issue 2416253004: ash: Use session_manager::SessionState (Closed)
Patch Set: add comment about session state in SessionStaetDelegateChromeos Created 4 years, 2 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
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shell/shell_delegate_impl.h" 5 #include "ash/shell/shell_delegate_impl.h"
6 6
7 #include "ash/app_list/app_list_presenter_delegate_factory.h" 7 #include "ash/app_list/app_list_presenter_delegate_factory.h"
8 #include "ash/common/accessibility_delegate.h" 8 #include "ash/common/accessibility_delegate.h"
9 #include "ash/common/default_accessibility_delegate.h" 9 #include "ash/common/default_accessibility_delegate.h"
10 #include "ash/common/gpu_support_stub.h" 10 #include "ash/common/gpu_support_stub.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 screen_locked_ = true; 130 screen_locked_ = true;
131 Shell::GetInstance()->UpdateShelfVisibility(); 131 Shell::GetInstance()->UpdateShelfVisibility();
132 } 132 }
133 void UnlockScreen() override { 133 void UnlockScreen() override {
134 screen_locked_ = false; 134 screen_locked_ = false;
135 Shell::GetInstance()->UpdateShelfVisibility(); 135 Shell::GetInstance()->UpdateShelfVisibility();
136 } 136 }
137 bool IsUserSessionBlocked() const override { 137 bool IsUserSessionBlocked() const override {
138 return !IsActiveUserSessionStarted() || IsScreenLocked(); 138 return !IsActiveUserSessionStarted() || IsScreenLocked();
139 } 139 }
140 SessionState GetSessionState() const override { 140 session_manager::SessionState GetSessionState() const override {
141 // Assume that if session is not active we're at login. 141 // Assume that if session is not active we're at login.
142 return IsActiveUserSessionStarted() ? SESSION_STATE_ACTIVE 142 return IsActiveUserSessionStarted()
143 : SESSION_STATE_LOGIN_PRIMARY; 143 ? session_manager::SessionState::ACTIVE
144 : session_manager::SessionState::LOGIN_PRIMARY;
144 } 145 }
145 const user_manager::UserInfo* GetUserInfo(UserIndex index) const override { 146 const user_manager::UserInfo* GetUserInfo(UserIndex index) const override {
146 return user_info_.get(); 147 return user_info_.get();
147 } 148 }
148 bool ShouldShowAvatar(WmWindow* window) const override { 149 bool ShouldShowAvatar(WmWindow* window) const override {
149 return !user_info_->GetImage().isNull(); 150 return !user_info_->GetImage().isNull();
150 } 151 }
151 gfx::ImageSkia GetAvatarImageForWindow(WmWindow* window) const override { 152 gfx::ImageSkia GetAvatarImageForWindow(WmWindow* window) const override {
152 return gfx::ImageSkia(); 153 return gfx::ImageSkia();
153 } 154 }
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 base::string16 ShellDelegateImpl::GetProductName() const { 294 base::string16 ShellDelegateImpl::GetProductName() const {
294 return base::string16(); 295 return base::string16();
295 } 296 }
296 297
297 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { 298 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const {
298 return gfx::Image(); 299 return gfx::Image();
299 } 300 }
300 301
301 } // namespace shell 302 } // namespace shell
302 } // namespace ash 303 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/test/ash_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698