OLD | NEW |
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 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
8 | 8 |
| 9 namespace ui { |
| 10 |
9 @interface SystemMonitorBridge : NSObject { | 11 @interface SystemMonitorBridge : NSObject { |
10 @private | 12 @private |
11 SystemMonitor* systemMonitor_; // weak | 13 SystemMonitor* systemMonitor_; // weak |
12 } | 14 } |
13 | 15 |
14 - (id)initWithSystemMonitor:(SystemMonitor*)monitor; | 16 - (id)initWithSystemMonitor:(SystemMonitor*)monitor; |
15 - (void)computerDidSleep:(NSNotification*)notification; | 17 - (void)computerDidSleep:(NSNotification*)notification; |
16 - (void)computerDidWake:(NSNotification*)notification; | 18 - (void)computerDidWake:(NSNotification*)notification; |
17 | 19 |
18 @end | 20 @end |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 @end | 60 @end |
59 | 61 |
60 void SystemMonitor::PlatformInit() { | 62 void SystemMonitor::PlatformInit() { |
61 system_monitor_bridge_ = | 63 system_monitor_bridge_ = |
62 [[SystemMonitorBridge alloc] initWithSystemMonitor:this]; | 64 [[SystemMonitorBridge alloc] initWithSystemMonitor:this]; |
63 } | 65 } |
64 | 66 |
65 void SystemMonitor::PlatformDestroy() { | 67 void SystemMonitor::PlatformDestroy() { |
66 [system_monitor_bridge_ release]; | 68 [system_monitor_bridge_ release]; |
67 } | 69 } |
| 70 |
| 71 } // namespace ui |
OLD | NEW |