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/hwnd_subclass.h" | 5 #include "ui/base/win/hwnd_subclass.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/memory/singleton.h" | 12 #include "base/memory/singleton.h" |
13 #include "base/stl_util.h" | 13 #include "base/stl_util.h" |
14 #include "ui/gfx/win/dpi.h" | |
15 #include "ui/gfx/win/hwnd_util.h" | 14 #include "ui/gfx/win/hwnd_util.h" |
16 | 15 |
17 namespace { | 16 namespace { |
18 const char kHWNDSubclassKey[] = "__UI_BASE_WIN_HWND_SUBCLASS_PROC__"; | 17 const char kHWNDSubclassKey[] = "__UI_BASE_WIN_HWND_SUBCLASS_PROC__"; |
19 | 18 |
20 LRESULT CALLBACK WndProc(HWND hwnd, | 19 LRESULT CALLBACK WndProc(HWND hwnd, |
21 UINT message, | 20 UINT message, |
22 WPARAM w_param, | 21 WPARAM w_param, |
23 LPARAM l_param) { | 22 LPARAM l_param) { |
24 ui::HWNDSubclass* wrapped_wnd_proc = | 23 ui::HWNDSubclass* wrapped_wnd_proc = |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 // In most cases, |original_wnd_proc_| will take care of calling | 163 // In most cases, |original_wnd_proc_| will take care of calling |
165 // DefWindowProc. | 164 // DefWindowProc. |
166 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param); | 165 return CallWindowProc(original_wnd_proc_, hwnd, message, w_param, l_param); |
167 } | 166 } |
168 | 167 |
169 HWNDMessageFilter::~HWNDMessageFilter() { | 168 HWNDMessageFilter::~HWNDMessageFilter() { |
170 HWNDSubclass::RemoveFilterFromAllTargets(this); | 169 HWNDSubclass::RemoveFilterFromAllTargets(this); |
171 } | 170 } |
172 | 171 |
173 } // namespace ui | 172 } // namespace ui |
OLD | NEW |