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

Side by Side Diff: ui/base/system_monitor/system_monitor.cc

Issue 6361002: Move SystemMonitor to src/chrome/common.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « ui/base/system_monitor/system_monitor.h ('k') | ui/base/system_monitor/system_monitor_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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 "app/system_monitor.h" 5 #include "ui/base/system_monitor/system_monitor.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 10
11 namespace ui {
12
11 static SystemMonitor* g_system_monitor = NULL; 13 static SystemMonitor* g_system_monitor = NULL;
12 14
13 #if defined(ENABLE_BATTERY_MONITORING) 15 #if defined(ENABLE_BATTERY_MONITORING)
14 // The amount of time (in ms) to wait before running the initial 16 // The amount of time (in ms) to wait before running the initial
15 // battery check. 17 // battery check.
16 static int kDelayedBatteryCheckMs = 10 * 1000; 18 static int kDelayedBatteryCheckMs = 10 * 1000;
17 #endif // defined(ENABLE_BATTERY_MONITORING) 19 #endif // defined(ENABLE_BATTERY_MONITORING)
18 20
19 SystemMonitor::SystemMonitor() 21 SystemMonitor::SystemMonitor()
20 : observer_list_(new ObserverListThreadSafe<PowerObserver>()), 22 : observer_list_(new ObserverListThreadSafe<PowerObserver>()),
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 } 97 }
96 98
97 void SystemMonitor::NotifyResume() { 99 void SystemMonitor::NotifyResume() {
98 VLOG(1) << "Power Resuming"; 100 VLOG(1) << "Power Resuming";
99 observer_list_->Notify(&PowerObserver::OnResume); 101 observer_list_->Notify(&PowerObserver::OnResume);
100 } 102 }
101 103
102 void SystemMonitor::BatteryCheck() { 104 void SystemMonitor::BatteryCheck() {
103 ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT); 105 ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT);
104 } 106 }
107
108 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/system_monitor/system_monitor.h ('k') | ui/base/system_monitor/system_monitor_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698