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

Side by Side Diff: base/power_monitor/power_monitor_device_source_win.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/metrics/field_trial_unittest.cc ('k') | base/process/kill.h » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698