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

Side by Side Diff: base/power_monitor/power_monitor_device_source.h

Issue 57383002: Fix WM_POWERBROADCAST handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 #ifndef BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ 5 #ifndef BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_
6 #define BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ 6 #define BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_
7 7
8 #include "base/base_export.h" 8 #include "base/base_export.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 private: 54 private:
55 #if defined(OS_WIN) 55 #if defined(OS_WIN)
56 // Represents a message-only window for power message handling on Windows. 56 // Represents a message-only window for power message handling on Windows.
57 // Only allow PowerMonitor to create it. 57 // Only allow PowerMonitor to create it.
58 class PowerMessageWindow { 58 class PowerMessageWindow {
59 public: 59 public:
60 PowerMessageWindow(); 60 PowerMessageWindow();
61 ~PowerMessageWindow(); 61 ~PowerMessageWindow();
62 62
63 private: 63 private:
64 void ProcessWmPowerBroadcastMessage(int event_id);
65 LRESULT CALLBACK WndProc(HWND hwnd, UINT message,
66 WPARAM wparam, LPARAM lparam);
67 static LRESULT CALLBACK WndProcThunk(HWND hwnd, 64 static LRESULT CALLBACK WndProcThunk(HWND hwnd,
68 UINT message, 65 UINT message,
69 WPARAM wparam, 66 WPARAM wparam,
70 LPARAM lparam); 67 LPARAM lparam);
71 // Instance of the module containing the window procedure. 68 // Instance of the module containing the window procedure.
72 HMODULE instance_; 69 HMODULE instance_;
73 // A hidden message-only window. 70 // A hidden message-only window.
74 HWND message_hwnd_; 71 HWND message_hwnd_;
75 }; 72 };
76 #endif // OS_WIN 73 #endif // OS_WIN
(...skipping 24 matching lines...) Expand all
101 #if defined(OS_WIN) 98 #if defined(OS_WIN)
102 PowerMessageWindow power_message_window_; 99 PowerMessageWindow power_message_window_;
103 #endif 100 #endif
104 101
105 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource); 102 DISALLOW_COPY_AND_ASSIGN(PowerMonitorDeviceSource);
106 }; 103 };
107 104
108 } // namespace base 105 } // namespace base
109 106
110 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_ 107 #endif // BASE_POWER_MONITOR_POWER_MONITOR_DEVICE_SOURCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698