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

Side by Side Diff: chrome/browser/chromeos/login/screen_locker.cc

Issue 7812036: Update base/timer.h code to pass through Location from call sites. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/login/screen_locker.h" 5 #include "chrome/browser/chromeos/login/screen_locker.h"
6 6
7 #include <X11/extensions/XTest.h> 7 #include <X11/extensions/XTest.h>
8 #include <X11/keysym.h> 8 #include <X11/keysym.h>
9 #include <gdk/gdkkeysyms.h> 9 #include <gdk/gdkkeysyms.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 }; 668 };
669 669
670 // A event observer used to show the screen locker upon 670 // A event observer used to show the screen locker upon
671 // user action: mouse or keyboard interactions. 671 // user action: mouse or keyboard interactions.
672 // TODO(oshima): this has to be disabled while authenticating. 672 // TODO(oshima): this has to be disabled while authenticating.
673 class LockerInputEventObserver : public MessageLoopForUI::Observer { 673 class LockerInputEventObserver : public MessageLoopForUI::Observer {
674 public: 674 public:
675 explicit LockerInputEventObserver(ScreenLocker* screen_locker) 675 explicit LockerInputEventObserver(ScreenLocker* screen_locker)
676 : screen_locker_(screen_locker), 676 : screen_locker_(screen_locker),
677 ALLOW_THIS_IN_INITIALIZER_LIST( 677 ALLOW_THIS_IN_INITIALIZER_LIST(
678 timer_(base::TimeDelta::FromSeconds(kScreenSaverIdleTimeout), this, 678 timer_(FROM_HERE,
679 base::TimeDelta::FromSeconds(kScreenSaverIdleTimeout), this,
679 &LockerInputEventObserver::StartScreenSaver)) { 680 &LockerInputEventObserver::StartScreenSaver)) {
680 } 681 }
681 682
682 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE { 683 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {
683 if ((event->type == GDK_KEY_PRESS || 684 if ((event->type == GDK_KEY_PRESS ||
684 event->type == GDK_BUTTON_PRESS || 685 event->type == GDK_BUTTON_PRESS ||
685 event->type == GDK_MOTION_NOTIFY)) { 686 event->type == GDK_MOTION_NOTIFY)) {
686 timer_.Reset(); 687 timer_.Reset();
687 screen_locker_->StopScreenSaver(); 688 screen_locker_->StopScreenSaver();
688 } 689 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1230
1230 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { 1231 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) {
1231 if (!background_view_->IsScreenSaverVisible()) { 1232 if (!background_view_->IsScreenSaverVisible()) {
1232 StartScreenSaver(); 1233 StartScreenSaver();
1233 return true; 1234 return true;
1234 } 1235 }
1235 return false; 1236 return false;
1236 } 1237 }
1237 1238
1238 } // namespace chromeos 1239 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/network_screen.cc ('k') | chrome/browser/chromeos/login/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698