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

Side by Side Diff: chromeos/dbus/power_manager_client.cc

Issue 15774005: chromeos: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 "chromeos/dbus/power_manager_client.h" 5 #include "chromeos/dbus/power_manager_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 &PowerManagerClientStubImpl::Update); 775 &PowerManagerClientStubImpl::Update);
776 } else { 776 } else {
777 timer_.Stop(); 777 timer_.Stop();
778 } 778 }
779 } 779 }
780 780
781 virtual void RequestRestart() OVERRIDE {} 781 virtual void RequestRestart() OVERRIDE {}
782 virtual void RequestShutdown() OVERRIDE {} 782 virtual void RequestShutdown() OVERRIDE {}
783 783
784 virtual void RequestIdleNotification(int64 threshold) OVERRIDE { 784 virtual void RequestIdleNotification(int64 threshold) OVERRIDE {
785 MessageLoop::current()->PostDelayedTask( 785 base::MessageLoop::current()->PostDelayedTask(
786 FROM_HERE, 786 FROM_HERE,
787 base::Bind(&PowerManagerClientStubImpl::TriggerIdleNotify, 787 base::Bind(&PowerManagerClientStubImpl::TriggerIdleNotify,
788 base::Unretained(this), 788 base::Unretained(this),
789 threshold), 789 threshold),
790 base::TimeDelta::FromMilliseconds(threshold)); 790 base::TimeDelta::FromMilliseconds(threshold));
791 } 791 }
792 792
793 virtual void NotifyUserActivity() OVERRIDE {} 793 virtual void NotifyUserActivity() OVERRIDE {}
794 virtual void NotifyVideoActivity( 794 virtual void NotifyVideoActivity(
795 const base::TimeTicks& last_activity_time, 795 const base::TimeTicks& last_activity_time,
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
875 PowerManagerClient* PowerManagerClient::Create( 875 PowerManagerClient* PowerManagerClient::Create(
876 DBusClientImplementationType type, 876 DBusClientImplementationType type,
877 dbus::Bus* bus) { 877 dbus::Bus* bus) {
878 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) 878 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION)
879 return new PowerManagerClientImpl(bus); 879 return new PowerManagerClientImpl(bus);
880 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); 880 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type);
881 return new PowerManagerClientStubImpl(); 881 return new PowerManagerClientStubImpl();
882 } 882 }
883 883
884 } // namespace chromeos 884 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/modem_messaging_client_unittest.cc ('k') | chromeos/dbus/shill_client_unittest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698