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

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

Issue 2446453002: Refactor ShouldLockScreenBeforeSuspending to ShouldLockScreenAutomatically (Closed)
Patch Set: comment Created 4 years, 1 month 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/system/chromeos/power/power_event_observer.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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 117
118 // SessionStateDelegate: 118 // SessionStateDelegate:
119 int GetMaximumNumberOfLoggedInUsers() const override { return 3; } 119 int GetMaximumNumberOfLoggedInUsers() const override { return 3; }
120 int NumberOfLoggedInUsers() const override { 120 int NumberOfLoggedInUsers() const override {
121 // ash_shell has 2 users. 121 // ash_shell has 2 users.
122 return 2; 122 return 2;
123 } 123 }
124 bool IsActiveUserSessionStarted() const override { return true; } 124 bool IsActiveUserSessionStarted() const override { return true; }
125 bool CanLockScreen() const override { return true; } 125 bool CanLockScreen() const override { return true; }
126 bool IsScreenLocked() const override { return screen_locked_; } 126 bool IsScreenLocked() const override { return screen_locked_; }
127 bool ShouldLockScreenBeforeSuspending() const override { return false; } 127 bool ShouldLockScreenAutomatically() const override { return false; }
128 void LockScreen() override { 128 void LockScreen() override {
129 shell::CreateLockScreen(); 129 shell::CreateLockScreen();
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 {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 base::string16 ShellDelegateImpl::GetProductName() const { 290 base::string16 ShellDelegateImpl::GetProductName() const {
291 return base::string16(); 291 return base::string16();
292 } 292 }
293 293
294 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const { 294 gfx::Image ShellDelegateImpl::GetDeprecatedAcceleratorImage() const {
295 return gfx::Image(); 295 return gfx::Image();
296 } 296 }
297 297
298 } // namespace shell 298 } // namespace shell
299 } // namespace ash 299 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/system/chromeos/power/power_event_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698