Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 938 // Invoked from DoDrag after the drag completes. This implementation does | 938 // Invoked from DoDrag after the drag completes. This implementation does |
| 939 // nothing, and is intended for subclasses to do cleanup. | 939 // nothing, and is intended for subclasses to do cleanup. |
| 940 virtual void OnDragDone(); | 940 virtual void OnDragDone(); |
| 941 | 941 |
| 942 // Returns true if the mouse was dragged enough to start a drag operation. | 942 // Returns true if the mouse was dragged enough to start a drag operation. |
| 943 // delta_x and y are the distance the mouse was dragged. | 943 // delta_x and y are the distance the mouse was dragged. |
| 944 static bool ExceededDragThreshold(const gfx::Vector2d& delta); | 944 static bool ExceededDragThreshold(const gfx::Vector2d& delta); |
| 945 | 945 |
| 946 // Accessibility ------------------------------------------------------------- | 946 // Accessibility ------------------------------------------------------------- |
| 947 | 947 |
| 948 // Gets the NativeViewAccessibility instance for this view, and creates one if | |
| 949 // it doesn't yet exist. | |
| 950 NativeViewAccessibility* GetNativeViewAccessibility(); | |
|
tapted
2016/09/26 05:19:18
I'm unsure about this - we'll have to see what vie
Patti Lor
2016/09/28 00:29:14
I like your alternative, but I think it needs to b
dmazzoni
2016/09/29 16:06:15
For context, the reason I didn't add GetNativeView
Patti Lor
2016/10/04 05:45:14
Ok, thanks for the context. I've deleted the chang
| |
| 951 | |
| 948 // Modifies |state| to reflect the current accessible state of this view. | 952 // Modifies |state| to reflect the current accessible state of this view. |
| 949 virtual void GetAccessibleState(ui::AXViewState* state) { } | 953 virtual void GetAccessibleState(ui::AXViewState* state) { } |
| 950 | 954 |
| 951 // Returns an instance of the native accessibility interface for this view. | 955 // Returns an instance of the native accessibility interface for this view. |
| 952 virtual gfx::NativeViewAccessible GetNativeViewAccessible(); | 956 virtual gfx::NativeViewAccessible GetNativeViewAccessible(); |
| 953 | 957 |
| 954 // Notifies assistive technology that an accessibility event has | 958 // Notifies assistive technology that an accessibility event has |
| 955 // occurred on this view, such as when the view is focused or when its | 959 // occurred on this view, such as when the view is focused or when its |
| 956 // value changes. Pass true for |send_native_event| except for rare | 960 // value changes. Pass true for |send_native_event| except for rare |
| 957 // cases where the view is a native control that's already sending a | 961 // 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 Loading... | |
| 1569 // Belongs to this view, but it's reference-counted on some platforms | 1573 // Belongs to this view, but it's reference-counted on some platforms |
| 1570 // so we can't use a scoped_ptr. It's dereferenced in the destructor. | 1574 // so we can't use a scoped_ptr. It's dereferenced in the destructor. |
| 1571 NativeViewAccessibility* native_view_accessibility_; | 1575 NativeViewAccessibility* native_view_accessibility_; |
| 1572 | 1576 |
| 1573 DISALLOW_COPY_AND_ASSIGN(View); | 1577 DISALLOW_COPY_AND_ASSIGN(View); |
| 1574 }; | 1578 }; |
| 1575 | 1579 |
| 1576 } // namespace views | 1580 } // namespace views |
| 1577 | 1581 |
| 1578 #endif // UI_VIEWS_VIEW_H_ | 1582 #endif // UI_VIEWS_VIEW_H_ |
| OLD | NEW |