OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/power_monitor/power_monitor.h" | 5 #include "base/power_monitor/power_monitor.h" |
6 #include "base/power_monitor/power_monitor_device_source.h" | 6 #include "base/power_monitor/power_monitor_device_source.h" |
7 #include "base/power_monitor/power_monitor_source.h" | 7 #include "base/power_monitor/power_monitor_source.h" |
| 8 #include "base/profiler/scoped_tracker.h" |
8 #include "base/win/wrapped_window_proc.h" | 9 #include "base/win/wrapped_window_proc.h" |
9 | 10 |
10 namespace base { | 11 namespace base { |
11 | 12 |
12 void ProcessPowerEventHelper(PowerMonitorSource::PowerEvent event) { | 13 void ProcessPowerEventHelper(PowerMonitorSource::PowerEvent event) { |
13 PowerMonitorSource::ProcessPowerEvent(event); | 14 PowerMonitorSource::ProcessPowerEvent(event); |
14 } | 15 } |
15 | 16 |
16 namespace { | 17 namespace { |
17 | 18 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 UnregisterClass(kWindowClassName, instance_); | 92 UnregisterClass(kWindowClassName, instance_); |
92 } | 93 } |
93 } | 94 } |
94 | 95 |
95 // static | 96 // static |
96 LRESULT CALLBACK PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk( | 97 LRESULT CALLBACK PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk( |
97 HWND hwnd, | 98 HWND hwnd, |
98 UINT message, | 99 UINT message, |
99 WPARAM wparam, | 100 WPARAM wparam, |
100 LPARAM lparam) { | 101 LPARAM lparam) { |
| 102 // TODO(vadimt): Remove ScopedTracker below once crbug.com/440919 is fixed. |
| 103 tracked_objects::ScopedTracker tracking_profile( |
| 104 FROM_HERE_WITH_EXPLICIT_FUNCTION( |
| 105 "440919 PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk")); |
| 106 |
101 switch (message) { | 107 switch (message) { |
102 case WM_POWERBROADCAST: | 108 case WM_POWERBROADCAST: |
103 ProcessWmPowerBroadcastMessage(wparam); | 109 ProcessWmPowerBroadcastMessage(wparam); |
104 return TRUE; | 110 return TRUE; |
105 default: | 111 default: |
106 return ::DefWindowProc(hwnd, message, wparam, lparam); | 112 return ::DefWindowProc(hwnd, message, wparam, lparam); |
107 } | 113 } |
108 } | 114 } |
109 | 115 |
110 } // namespace base | 116 } // namespace base |
OLD | NEW |