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

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

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (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_(FROM_HERE, 678 timer_(base::TimeDelta::FromSeconds(kScreenSaverIdleTimeout), this,
679 base::TimeDelta::FromSeconds(kScreenSaverIdleTimeout), this,
680 &LockerInputEventObserver::StartScreenSaver)) { 679 &LockerInputEventObserver::StartScreenSaver)) {
681 } 680 }
682 681
683 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE { 682 virtual void WillProcessEvent(GdkEvent* event) OVERRIDE {
684 if ((event->type == GDK_KEY_PRESS || 683 if ((event->type == GDK_KEY_PRESS ||
685 event->type == GDK_BUTTON_PRESS || 684 event->type == GDK_BUTTON_PRESS ||
686 event->type == GDK_MOTION_NOTIFY)) { 685 event->type == GDK_MOTION_NOTIFY)) {
687 timer_.Reset(); 686 timer_.Reset();
688 screen_locker_->StopScreenSaver(); 687 screen_locker_->StopScreenSaver();
689 } 688 }
(...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after
1230 1229
1231 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) { 1230 bool ScreenLocker::AcceleratorPressed(const views::Accelerator& accelerator) {
1232 if (!background_view_->IsScreenSaverVisible()) { 1231 if (!background_view_->IsScreenSaverVisible()) {
1233 StartScreenSaver(); 1232 StartScreenSaver();
1234 return true; 1233 return true;
1235 } 1234 }
1236 return false; 1235 return false;
1237 } 1236 }
1238 1237
1239 } // namespace chromeos 1238 } // 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