| 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/profiler/scoped_tracker.h" |
| 9 #include "base/win/wrapped_window_proc.h" | 9 #include "base/win/wrapped_window_proc.h" |
| 10 | 10 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 UnregisterClass(kWindowClassName, instance_); | 92 UnregisterClass(kWindowClassName, instance_); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 // static | 96 // static |
| 97 LRESULT CALLBACK PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk( | 97 LRESULT CALLBACK PowerMonitorDeviceSource::PowerMessageWindow::WndProcThunk( |
| 98 HWND hwnd, | 98 HWND hwnd, |
| 99 UINT message, | 99 UINT message, |
| 100 WPARAM wparam, | 100 WPARAM wparam, |
| 101 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 | |
| 107 switch (message) { | 102 switch (message) { |
| 108 case WM_POWERBROADCAST: | 103 case WM_POWERBROADCAST: |
| 109 ProcessWmPowerBroadcastMessage(wparam); | 104 ProcessWmPowerBroadcastMessage(wparam); |
| 110 return TRUE; | 105 return TRUE; |
| 111 default: | 106 default: |
| 112 return ::DefWindowProc(hwnd, message, wparam, lparam); | 107 return ::DefWindowProc(hwnd, message, wparam, lparam); |
| 113 } | 108 } |
| 114 } | 109 } |
| 115 | 110 |
| 116 } // namespace base | 111 } // namespace base |
| OLD | NEW |