OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/controls/native_control.h" | 5 #include "ui/views/controls/native_control.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlapp.h> | 8 #include <atlapp.h> |
9 #include <atlcrack.h> | 9 #include <atlcrack.h> |
10 #include <atlframe.h> | 10 #include <atlframe.h> |
11 #include <atlmisc.h> | 11 #include <atlmisc.h> |
12 | 12 |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "ui/base/accessibility/accessibility_types.h" | 15 #include "ui/base/accessibility/accessibility_types.h" |
16 #include "ui/base/keycodes/keyboard_code_conversion_win.h" | 16 #include "ui/base/keycodes/keyboard_code_conversion_win.h" |
17 #include "ui/base/keycodes/keyboard_codes.h" | 17 #include "ui/base/keycodes/keyboard_codes.h" |
18 #include "ui/base/l10n/l10n_util_win.h" | 18 #include "ui/base/l10n/l10n_util_win.h" |
19 #include "ui/base/view_prop.h" | 19 #include "ui/base/view_prop.h" |
20 #include "ui/base/win/hwnd_util.h" | 20 #include "ui/base/win/hwnd_util.h" |
| 21 #include "ui/views/background.h" |
| 22 #include "ui/views/border.h" |
21 #include "ui/views/controls/native/native_view_host.h" | 23 #include "ui/views/controls/native/native_view_host.h" |
22 #include "ui/views/focus/focus_manager.h" | 24 #include "ui/views/focus/focus_manager.h" |
23 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
24 #include "views/background.h" | |
25 #include "views/border.h" | |
26 | 26 |
27 using ui::ViewProp; | 27 using ui::ViewProp; |
28 | 28 |
29 namespace views { | 29 namespace views { |
30 | 30 |
31 // Maps to the NativeControl. | 31 // Maps to the NativeControl. |
32 static const char* const kNativeControlKey = "__NATIVE_CONTROL__"; | 32 static const char* const kNativeControlKey = "__NATIVE_CONTROL__"; |
33 | 33 |
34 class NativeControlContainer : public CWindowImpl<NativeControlContainer, | 34 class NativeControlContainer : public CWindowImpl<NativeControlContainer, |
35 CWindow, | 35 CWindow, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 } else if (message == WM_DESTROY) { | 383 } else if (message == WM_DESTROY) { |
384 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler)); | 384 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler)); |
385 native_control->container_->prop_.reset(); | 385 native_control->container_->prop_.reset(); |
386 } | 386 } |
387 | 387 |
388 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, | 388 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, |
389 message, w_param, l_param); | 389 message, w_param, l_param); |
390 } | 390 } |
391 | 391 |
392 } // namespace views | 392 } // namespace views |
OLD | NEW |