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

Side by Side Diff: ui/views/view.h

Issue 2210763002: MacViews a11y: Sync VoiceOver cursor with keyboard focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments, delete accessibilityShouldUseUniqueId. Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_VIEWS_VIEW_H_ 5 #ifndef UI_VIEWS_VIEW_H_
6 #define UI_VIEWS_VIEW_H_ 6 #define UI_VIEWS_VIEW_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 // Invoked from DoDrag after the drag completes. This implementation does 933 // Invoked from DoDrag after the drag completes. This implementation does
934 // nothing, and is intended for subclasses to do cleanup. 934 // nothing, and is intended for subclasses to do cleanup.
935 virtual void OnDragDone(); 935 virtual void OnDragDone();
936 936
937 // Returns true if the mouse was dragged enough to start a drag operation. 937 // Returns true if the mouse was dragged enough to start a drag operation.
938 // delta_x and y are the distance the mouse was dragged. 938 // delta_x and y are the distance the mouse was dragged.
939 static bool ExceededDragThreshold(const gfx::Vector2d& delta); 939 static bool ExceededDragThreshold(const gfx::Vector2d& delta);
940 940
941 // Accessibility ------------------------------------------------------------- 941 // Accessibility -------------------------------------------------------------
942 942
943 // Gets the NativeViewAccessibility instance for this view, and creates one if
944 // it doesn't yet exist.
945 NativeViewAccessibility* GetNativeViewAccessibility();
946
943 // Modifies |state| to reflect the current accessible state of this view. 947 // Modifies |state| to reflect the current accessible state of this view.
944 virtual void GetAccessibleState(ui::AXViewState* state) { } 948 virtual void GetAccessibleState(ui::AXViewState* state) { }
945 949
946 // Returns an instance of the native accessibility interface for this view. 950 // Returns an instance of the native accessibility interface for this view.
947 virtual gfx::NativeViewAccessible GetNativeViewAccessible(); 951 virtual gfx::NativeViewAccessible GetNativeViewAccessible();
948 952
949 // Notifies assistive technology that an accessibility event has 953 // Notifies assistive technology that an accessibility event has
950 // occurred on this view, such as when the view is focused or when its 954 // occurred on this view, such as when the view is focused or when its
951 // value changes. Pass true for |send_native_event| except for rare 955 // value changes. Pass true for |send_native_event| except for rare
952 // cases where the view is a native control that's already sending a 956 // cases where the view is a native control that's already sending a
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 // Belongs to this view, but it's reference-counted on some platforms 1568 // Belongs to this view, but it's reference-counted on some platforms
1565 // so we can't use a scoped_ptr. It's dereferenced in the destructor. 1569 // so we can't use a scoped_ptr. It's dereferenced in the destructor.
1566 NativeViewAccessibility* native_view_accessibility_; 1570 NativeViewAccessibility* native_view_accessibility_;
1567 1571
1568 DISALLOW_COPY_AND_ASSIGN(View); 1572 DISALLOW_COPY_AND_ASSIGN(View);
1569 }; 1573 };
1570 1574
1571 } // namespace views 1575 } // namespace views
1572 1576
1573 #endif // UI_VIEWS_VIEW_H_ 1577 #endif // UI_VIEWS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698