| 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_win.h" | 5 #include "ui/views/controls/native_control_win.h" |
| 6 | 6 |
| 7 #include <windowsx.h> | 7 #include <windowsx.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ui/base/accessibility/accessibility_types.h" | 10 #include "ui/base/accessibility/accessibility_types.h" |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 return 0; | 208 return 0; |
| 209 } else if (message == WM_SETFOCUS) { | 209 } else if (message == WM_SETFOCUS) { |
| 210 // Let the focus manager know that the focus changed. | 210 // Let the focus manager know that the focus changed. |
| 211 FocusManager* focus_manager = native_control->GetFocusManager(); | 211 FocusManager* focus_manager = native_control->GetFocusManager(); |
| 212 if (focus_manager) { | 212 if (focus_manager) { |
| 213 focus_manager->SetFocusedView(native_control->focus_view()); | 213 focus_manager->SetFocusedView(native_control->focus_view()); |
| 214 } else { | 214 } else { |
| 215 NOTREACHED(); | 215 NOTREACHED(); |
| 216 } | 216 } |
| 217 } else if (message == WM_DESTROY) { | 217 } else if (message == WM_DESTROY) { |
| 218 native_control->props_.reset(); | 218 native_control->props_.clear(); |
| 219 ui::SetWindowProc(window, native_control->original_wndproc_); | 219 ui::SetWindowProc(window, native_control->original_wndproc_); |
| 220 } | 220 } |
| 221 | 221 |
| 222 return CallWindowProc(native_control->original_wndproc_, window, message, | 222 return CallWindowProc(native_control->original_wndproc_, window, message, |
| 223 w_param, l_param); | 223 w_param, l_param); |
| 224 } | 224 } |
| 225 | 225 |
| 226 } // namespace views | 226 } // namespace views |
| OLD | NEW |