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

Side by Side Diff: app/hi_res_timer_manager.h

Issue 431008: Make SystemMonitor not a Singleton and move it out of base (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: fix ChromeFrame build Created 11 years 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
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef APP_HI_RES_TIMER_MANAGER_H_
6 #define APP_HI_RES_TIMER_MANAGER_H_
7
8 #include "app/system_monitor.h"
9
10 // Ensures that the Windows high resolution timer is only used
11 // when not running on battery power.
12 class HighResolutionTimerManager : public SystemMonitor::PowerObserver {
13 public:
14 HighResolutionTimerManager();
15 virtual ~HighResolutionTimerManager();
16
17 // SystemMonitor::PowerObserver:
18 void OnPowerStateChange(bool on_battery_power);
19
20 private:
21 // Enable or disable the faster multimedia timer.
22 void UseHiResClock(bool use);
23
24 bool hi_res_clock_used_;
25
26 DISALLOW_COPY_AND_ASSIGN(HighResolutionTimerManager);
27 };
28
29 #endif // APP_HI_RES_TIMER_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698