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

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

Issue 8909002: views: Convert IsEnabled() to just enabled() since it's just a simple accessor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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/reload_button_unittest.cc ('k') | ui/views/accessible_pane_view.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/accessibility/native_view_accessibility_win.h" 5 #include "ui/views/accessibility/native_view_accessibility_win.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlcom.h> 8 #include <atlcom.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 955 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 VARIANT* msaa_state, views::View* view) { 966 VARIANT* msaa_state, views::View* view) {
967 // Ensure the output param is initialized to zero. 967 // Ensure the output param is initialized to zero.
968 msaa_state->lVal = 0; 968 msaa_state->lVal = 0;
969 969
970 // Default state; all views can have accessibility focus. 970 // Default state; all views can have accessibility focus.
971 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE; 971 msaa_state->lVal |= STATE_SYSTEM_FOCUSABLE;
972 972
973 if (!view) 973 if (!view)
974 return; 974 return;
975 975
976 if (!view->IsEnabled()) 976 if (!view->enabled())
977 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE; 977 msaa_state->lVal |= STATE_SYSTEM_UNAVAILABLE;
978 if (!view->IsVisible()) 978 if (!view->IsVisible())
979 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE; 979 msaa_state->lVal |= STATE_SYSTEM_INVISIBLE;
980 if (view->IsHotTracked()) 980 if (view->IsHotTracked())
981 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED; 981 msaa_state->lVal |= STATE_SYSTEM_HOTTRACKED;
982 if (view->HasFocus()) 982 if (view->HasFocus())
983 msaa_state->lVal |= STATE_SYSTEM_FOCUSED; 983 msaa_state->lVal |= STATE_SYSTEM_FOCUSED;
984 984
985 // Add on any view-specific states. 985 // Add on any view-specific states.
986 ui::AccessibleViewState view_state; 986 ui::AccessibleViewState view_state;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 const string16& text, 1025 const string16& text,
1026 IA2TextBoundaryType ia2_boundary, 1026 IA2TextBoundaryType ia2_boundary,
1027 LONG start_offset, 1027 LONG start_offset,
1028 ui::TextBoundaryDirection direction) { 1028 ui::TextBoundaryDirection direction) {
1029 HandleSpecialTextOffset(text, &start_offset); 1029 HandleSpecialTextOffset(text, &start_offset);
1030 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1030 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1031 std::vector<int32> line_breaks; 1031 std::vector<int32> line_breaks;
1032 return ui::FindAccessibleTextBoundary( 1032 return ui::FindAccessibleTextBoundary(
1033 text, line_breaks, boundary, start_offset, direction); 1033 text, line_breaks, boundary, start_offset, direction);
1034 } 1034 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/reload_button_unittest.cc ('k') | ui/views/accessible_pane_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698