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

Side by Side Diff: base/system_monitor/system_monitor_mac.mm

Issue 9363008: Add Media device notification to SystemMonitor and Mac impl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move mac notification code to content Created 8 years, 10 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) 2012 The Chromium Authors. All rights reserved.
Avi (use Gerrit) 2012/02/25 22:13:00 Why is this file in the CL if it's not otherwise m
vandebo (ex-Chrome) 2012/02/28 00:51:33 Oops, it was modified in a previous patch set. Fi
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 // Implementation based on sample code from 5 // Implementation based on sample code from
6 // http://developer.apple.com/library/mac/#qa/qa1340/_index.html. 6 // http://developer.apple.com/library/mac/#qa/qa1340/_index.html.
7 7
8 #include "base/system_monitor/system_monitor.h" 8 #include "base/system_monitor/system_monitor.h"
9 9
10 #include <IOKit/pwr_mgt/IOPMLib.h> 10 #include <IOKit/pwr_mgt/IOPMLib.h>
11 #include <IOKit/IOMessage.h> 11 #include <IOKit/IOMessage.h>
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // so we close it here. 89 // so we close it here.
90 IOServiceClose(g_system_power_io_port); 90 IOServiceClose(g_system_power_io_port);
91 91
92 g_system_power_io_port = 0; 92 g_system_power_io_port = 0;
93 93
94 // Destroy the notification port allocated by IORegisterForSystemPower. 94 // Destroy the notification port allocated by IORegisterForSystemPower.
95 IONotificationPortDestroy(g_notification_port_ref); 95 IONotificationPortDestroy(g_notification_port_ref);
96 } 96 }
97 97
98 } // namespace base 98 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698