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

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

Issue 10825273: Clean-up inline members of nested classes (base/) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 "base/system_monitor/system_monitor.h" 5 #include "base/system_monitor/system_monitor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 } 43 }
44 44
45 SystemMonitor::~SystemMonitor() { 45 SystemMonitor::~SystemMonitor() {
46 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
47 PlatformDestroy(); 47 PlatformDestroy();
48 #endif 48 #endif
49 DCHECK_EQ(this, g_system_monitor); 49 DCHECK_EQ(this, g_system_monitor);
50 g_system_monitor = NULL; 50 g_system_monitor = NULL;
51 } 51 }
52 52
53 SystemMonitor::MediaDeviceInfo::MediaDeviceInfo(
jar (doing other things) 2012/08/09 16:30:27 nit: Since the declaration of this method in the n
hans 2012/08/09 18:28:48 Done.
54 const std::string& id,
55 const string16& device_name,
56 MediaDeviceType device_type,
57 const FilePath::StringType& device_location)
58 : unique_id(id),
59 name(device_name),
60 type(device_type),
61 location(device_location) {
62 }
63
53 // static 64 // static
54 SystemMonitor* SystemMonitor::Get() { 65 SystemMonitor* SystemMonitor::Get() {
55 return g_system_monitor; 66 return g_system_monitor;
56 } 67 }
57 68
58 void SystemMonitor::ProcessPowerMessage(PowerEvent event_id) { 69 void SystemMonitor::ProcessPowerMessage(PowerEvent event_id) {
59 // Suppress duplicate notifications. Some platforms may 70 // Suppress duplicate notifications. Some platforms may
60 // send multiple notifications of the same event. 71 // send multiple notifications of the same event.
61 switch (event_id) { 72 switch (event_id) {
62 case POWER_STATE_EVENT: 73 case POWER_STATE_EVENT:
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void SystemMonitor::NotifyResume() { 186 void SystemMonitor::NotifyResume() {
176 DVLOG(1) << "Power Resuming"; 187 DVLOG(1) << "Power Resuming";
177 power_observer_list_->Notify(&PowerObserver::OnResume); 188 power_observer_list_->Notify(&PowerObserver::OnResume);
178 } 189 }
179 190
180 void SystemMonitor::BatteryCheck() { 191 void SystemMonitor::BatteryCheck() {
181 ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT); 192 ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT);
182 } 193 }
183 194
184 } // namespace base 195 } // namespace base
OLDNEW
« no previous file with comments | « base/system_monitor/system_monitor.h ('k') | base/values.h » ('j') | base/values.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698