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

Side by Side Diff: views/accessibility/view_accessibility.cc

Issue 2817022: Small tweaks to improve toolbar keyboard accessibility: Put focus rects... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 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
OLDNEW
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/accessibility/view_accessibility.h" 5 #include "views/accessibility/view_accessibility.h"
6 6
7 #include "views/accessibility/view_accessibility_wrapper.h" 7 #include "views/accessibility/view_accessibility_wrapper.h"
8 #include "views/widget/widget.h" 8 #include "views/widget/widget.h"
9 #include "views/widget/widget_win.h" 9 #include "views/widget/widget_win.h"
10 10
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 } 703 }
704 if (view->IsHotTracked()) { 704 if (view->IsHotTracked()) {
705 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; 705 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED;
706 } 706 }
707 if (view->IsPushed()) { 707 if (view->IsPushed()) {
708 msaa_state->lVal |= STATE_SYSTEM_PRESSED; 708 msaa_state->lVal |= STATE_SYSTEM_PRESSED;
709 } 709 }
710 // Check both for actual View focus, as well as accessibility focus. 710 // Check both for actual View focus, as well as accessibility focus.
711 views::View* parent = view->GetParent(); 711 views::View* parent = view->GetParent();
712 712
713 if (view->HasFocus() || 713 if (view->HasFocus())
714 (parent && parent->GetAccFocusedChildView() == view)) {
715 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; 714 msaa_state->lVal |= STATE_SYSTEM_FOCUSED;
716 }
717 715
718 // Add on any view-specific states. 716 // Add on any view-specific states.
719 AccessibilityTypes::State state; 717 AccessibilityTypes::State state;
720 if (view->GetAccessibleState(&state)) 718 if (view->GetAccessibleState(&state))
721 msaa_state->lVal |= MSAAState(state); 719 msaa_state->lVal |= MSAAState(state);
722 } 720 }
723 721
724 // IAccessible functions not supported. 722 // IAccessible functions not supported.
725 723
726 HRESULT ViewAccessibility::accDoDefaultAction(VARIANT var_id) { 724 HRESULT ViewAccessibility::accDoDefaultAction(VARIANT var_id) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
884 HWND native_view_window , IDispatch** disp_child) { 882 HWND native_view_window , IDispatch** disp_child) {
885 if (IsWindow(native_view_window)) { 883 if (IsWindow(native_view_window)) {
886 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, 884 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0,
887 OBJID_CLIENT); 885 OBJID_CLIENT);
888 return ObjectFromLresult(ret, IID_IDispatch, 0, 886 return ObjectFromLresult(ret, IID_IDispatch, 0,
889 reinterpret_cast<void**>(disp_child)); 887 reinterpret_cast<void**>(disp_child));
890 } 888 }
891 889
892 return E_FAIL; 890 return E_FAIL;
893 } 891 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698