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

Side by Side Diff: trunk/src/chrome/browser/idle_chromeos.cc

Issue 14200034: Revert 194578 "Add ash SessionStateDelegate" (Closed) Base URL: svn://svn.chromium.org/chrome/
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 (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/idle.h" 5 #include "chrome/browser/idle.h"
6 6
7 #include "ash/session_state_delegate.h"
8 #include "ash/shell.h" 7 #include "ash/shell.h"
9 #include "ash/wm/user_activity_detector.h" 8 #include "ash/wm/user_activity_detector.h"
10 #include "base/time.h" 9 #include "base/time.h"
11 10
12 void CalculateIdleTime(IdleTimeCallback notify) { 11 void CalculateIdleTime(IdleTimeCallback notify) {
13 base::TimeDelta idle_time = base::TimeTicks::Now() - 12 base::TimeDelta idle_time = base::TimeTicks::Now() -
14 ash::Shell::GetInstance()->user_activity_detector()->last_activity_time(); 13 ash::Shell::GetInstance()->user_activity_detector()->last_activity_time();
15 notify.Run(static_cast<int>(idle_time.InSeconds())); 14 notify.Run(static_cast<int>(idle_time.InSeconds()));
16 } 15 }
17 16
18 bool CheckIdleStateIsLocked() { 17 bool CheckIdleStateIsLocked() {
19 return ash::Shell::GetInstance()->session_state_delegate()->IsScreenLocked(); 18 return ash::Shell::GetInstance()->IsScreenLocked();
20 } 19 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698