| 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> |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 if (location.x == -1 && location.y == -1) | 272 if (location.x == -1 && location.y == -1) |
| 273 ShowContextMenu(GetKeyboardContextMenuLocation(), false); | 273 ShowContextMenu(GetKeyboardContextMenuLocation(), false); |
| 274 else | 274 else |
| 275 ShowContextMenu(gfx::Point(location), true); | 275 ShowContextMenu(gfx::Point(location), true); |
| 276 } | 276 } |
| 277 | 277 |
| 278 void NativeControl::OnFocus() { | 278 void NativeControl::OnFocus() { |
| 279 if (container_) { | 279 if (container_) { |
| 280 DCHECK(container_->GetControl()); | 280 DCHECK(container_->GetControl()); |
| 281 ::SetFocus(container_->GetControl()); | 281 ::SetFocus(container_->GetControl()); |
| 282 if (GetWidget()) { | 282 NotifyAccessibilityEvent(ui::AccessibilityTypes::EVENT_FOCUS, false); |
| 283 GetWidget()->NotifyAccessibilityEvent( | |
| 284 this, ui::AccessibilityTypes::EVENT_FOCUS, false); | |
| 285 } | |
| 286 } | 283 } |
| 287 } | 284 } |
| 288 | 285 |
| 289 HWND NativeControl::GetNativeControlHWND() { | 286 HWND NativeControl::GetNativeControlHWND() { |
| 290 if (container_) | 287 if (container_) |
| 291 return container_->GetControl(); | 288 return container_->GetControl(); |
| 292 else | 289 else |
| 293 return NULL; | 290 return NULL; |
| 294 } | 291 } |
| 295 | 292 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } else if (message == WM_DESTROY) { | 378 } else if (message == WM_DESTROY) { |
| 382 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler)); | 379 ui::SetWindowProc(window, reinterpret_cast<WNDPROC>(original_handler)); |
| 383 native_control->container_->prop_.reset(); | 380 native_control->container_->prop_.reset(); |
| 384 } | 381 } |
| 385 | 382 |
| 386 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, | 383 return CallWindowProc(reinterpret_cast<WNDPROC>(original_handler), window, |
| 387 message, w_param, l_param); | 384 message, w_param, l_param); |
| 388 } | 385 } |
| 389 | 386 |
| 390 } // namespace views | 387 } // namespace views |
| OLD | NEW |