Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: ui/views/controls/native_control.cc

Issue 13524005: Cleanup: remove NotifyAccessibilityEvent from views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/controls/native_control_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/controls/native/native_view_host.cc ('k') | ui/views/controls/native_control_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698