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

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

Issue 7057014: Variety of tweaks to View API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 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 | « chrome/browser/ui/views/wrench_menu.cc ('k') | views/controls/button/native_button.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 "views/accessibility/native_view_accessibility_win.h" 5 #include "views/accessibility/native_view_accessibility_win.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/base/view_prop.h" 8 #include "ui/base/view_prop.h"
9 #include "views/controls/button/native_button.h" 9 #include "views/controls/button/native_button.h"
10 #include "views/widget/native_widget_win.h" 10 #include "views/widget/native_widget_win.h"
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 msaa_state->lVal = 0; 533 msaa_state->lVal = 0;
534 534
535 // Default state; all views can have accessibility focus. 535 // Default state; all views can have accessibility focus.
536 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; 536 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE;
537 537
538 if (!view) 538 if (!view)
539 return; 539 return;
540 540
541 if (!view->IsEnabled()) 541 if (!view->IsEnabled())
542 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; 542 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE;
543 if (!view->IsVisible()) 543 if (!view->visible())
544 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; 544 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE;
545 if (view->IsHotTracked()) 545 if (view->IsHotTracked())
546 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; 546 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED;
547 if (view->HasFocus()) 547 if (view->HasFocus())
548 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; 548 msaa_state->lVal |= STATE_SYSTEM_FOCUSED;
549 549
550 // Add on any view-specific states. 550 // Add on any view-specific states.
551 ui::AccessibleViewState view_state; 551 ui::AccessibleViewState view_state;
552 view->GetAccessibleState(&view_state); 552 view->GetAccessibleState(&view_state);
553 msaa_state->lVal |= MSAAState(view_state.state); 553 msaa_state->lVal |= MSAAState(view_state.state);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 HWND native_view_window , IAccessible** accessible) { 746 HWND native_view_window , IAccessible** accessible) {
747 if (IsWindow(native_view_window)) { 747 if (IsWindow(native_view_window)) {
748 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, 748 LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0,
749 OBJID_CLIENT); 749 OBJID_CLIENT);
750 return ObjectFromLresult(ret, IID_IDispatch, 0, 750 return ObjectFromLresult(ret, IID_IDispatch, 0,
751 reinterpret_cast<void**>(accessible)); 751 reinterpret_cast<void**>(accessible));
752 } 752 }
753 753
754 return E_FAIL; 754 return E_FAIL;
755 } 755 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/wrench_menu.cc ('k') | views/controls/button/native_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698