| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "views/controls/native_control.h" | 5 #include "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> |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 if (location.x == -1 && location.y == -1) | 263 if (location.x == -1 && location.y == -1) |
| 264 ShowContextMenu(GetKeyboardContextMenuLocation(), false); | 264 ShowContextMenu(GetKeyboardContextMenuLocation(), false); |
| 265 else | 265 else |
| 266 ShowContextMenu(gfx::Point(location), true); | 266 ShowContextMenu(gfx::Point(location), true); |
| 267 } | 267 } |
| 268 | 268 |
| 269 void NativeControl::Focus() { | 269 void NativeControl::Focus() { |
| 270 if (container_) { | 270 if (container_) { |
| 271 DCHECK(container_->GetControl()); | 271 DCHECK(container_->GetControl()); |
| 272 ::SetFocus(container_->GetControl()); | 272 ::SetFocus(container_->GetControl()); |
| 273 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS); | 273 NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS, false); |
| 274 } | 274 } |
| 275 } | 275 } |
| 276 | 276 |
| 277 HWND NativeControl::GetNativeControlHWND() { | 277 HWND NativeControl::GetNativeControlHWND() { |
| 278 if (container_) | 278 if (container_) |
| 279 return container_->GetControl(); | 279 return container_->GetControl(); |
| 280 else | 280 else |
| 281 return NULL; | 281 return NULL; |
| 282 } | 282 } |
| 283 | 283 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 reinterpret_cast<WNDPROC>(original_handler)); | 374 reinterpret_cast<WNDPROC>(original_handler)); |
| 375 RemoveProp(window, kHandlerKey); | 375 RemoveProp(window, kHandlerKey); |
| 376 RemoveProp(window, kNativeControlKey); | 376 RemoveProp(window, kNativeControlKey); |
| 377 } | 377 } |
| 378 | 378 |
| 379 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, | 379 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, |
| 380 message, w_param, l_param); | 380 message, w_param, l_param); |
| 381 } | 381 } |
| 382 | 382 |
| 383 } // namespace views | 383 } // namespace views |
| OLD | NEW |