OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/base/win/foreground_helper.h" | 5 #include "ui/base/win/foreground_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "ui/gfx/win/window_impl.h" | 8 #include "ui/gfx/win/window_impl.h" |
9 | 9 |
10 namespace ui { | 10 namespace ui { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
68 UnregisterHotKey(hwnd(), kHotKeyId); | 68 UnregisterHotKey(hwnd(), kHotKeyId); |
69 KillTimer(hwnd(), kHotKeyId); | 69 KillTimer(hwnd(), kHotKeyId); |
70 DestroyWindow(hwnd()); | 70 DestroyWindow(hwnd()); |
71 | 71 |
72 return S_OK; | 72 return S_OK; |
73 } | 73 } |
74 | 74 |
75 // Handle the registered Hotkey being pressed. | 75 // Handle the registered Hotkey being pressed. |
76 LRESULT ForegroundHelper::OnHotKey(UINT message, | 76 void ForegroundHelper::OnHotKey(int id, UINT vcode, UINT modifiers) { |
77 WPARAM wparam, | |
78 LPARAM lparam, | |
79 BOOL& handled) { | |
80 SetForegroundWindow(window_); | 77 SetForegroundWindow(window_); |
81 return 1; | |
82 } | 78 } |
83 | 79 |
84 } // namespace ui | 80 } // namespace ui |
OLD | NEW |