| OLD | NEW |
| 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 #ifndef VIEWS_VIEW_H_ | 5 #ifndef VIEWS_VIEW_H_ |
| 6 #define VIEWS_VIEW_H_ | 6 #define VIEWS_VIEW_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 // certain type. | 601 // certain type. |
| 602 void SetAccessibleName(const std::wstring& name); | 602 void SetAccessibleName(const std::wstring& name); |
| 603 | 603 |
| 604 void SetAccessibleRole(const AccessibilityTypes::Role role); | 604 void SetAccessibleRole(const AccessibilityTypes::Role role); |
| 605 | 605 |
| 606 // Returns an instance of a wrapper class implementing the (platform-specific) | 606 // Returns an instance of a wrapper class implementing the (platform-specific) |
| 607 // accessibility interface for a given View. If one exists, it will be | 607 // accessibility interface for a given View. If one exists, it will be |
| 608 // re-used, otherwise a new instance will be created. | 608 // re-used, otherwise a new instance will be created. |
| 609 ViewAccessibilityWrapper* GetViewAccessibilityWrapper(); | 609 ViewAccessibilityWrapper* GetViewAccessibilityWrapper(); |
| 610 | 610 |
| 611 // Accessor used to determine if a child view (leaf) has accessibility focus. | |
| 612 // Returns NULL if there are no children, or if none of the children has | |
| 613 // accessibility focus. | |
| 614 virtual View* GetAccFocusedChildView() { return NULL; } | |
| 615 | |
| 616 // Try to give accessibility focus to a given child view. Returns true on | |
| 617 // success. Returns false if this view isn't already focused, if it doesn't | |
| 618 // support accessibility focus for children, or if the given view isn't a | |
| 619 // valid child view that can receive accessibility focus. | |
| 620 virtual bool SetAccFocusedChildView(View* child_view) { return false; } | |
| 621 | |
| 622 // Utility functions | 611 // Utility functions |
| 623 | 612 |
| 624 // Note that the utility coordinate conversions functions always operate on | 613 // Note that the utility coordinate conversions functions always operate on |
| 625 // the mirrored position of the child Views if the parent View uses a | 614 // the mirrored position of the child Views if the parent View uses a |
| 626 // right-to-left UI layout. | 615 // right-to-left UI layout. |
| 627 | 616 |
| 628 // Convert a point from source coordinate system to dst coordinate system. | 617 // Convert a point from source coordinate system to dst coordinate system. |
| 629 // | 618 // |
| 630 // source is a parent or a child of dst, directly or transitively. | 619 // source is a parent or a child of dst, directly or transitively. |
| 631 // If source and dst are not in the same View hierarchy, the result is | 620 // If source and dst are not in the same View hierarchy, the result is |
| (...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 // The default value for how long to wait (in ms) before showing a menu | 1318 // The default value for how long to wait (in ms) before showing a menu |
| 1330 // button on hover. This value is used if the OS doesn't supply one. | 1319 // button on hover. This value is used if the OS doesn't supply one. |
| 1331 static const int kShowFolderDropMenuDelay; | 1320 static const int kShowFolderDropMenuDelay; |
| 1332 | 1321 |
| 1333 DISALLOW_COPY_AND_ASSIGN(View); | 1322 DISALLOW_COPY_AND_ASSIGN(View); |
| 1334 }; | 1323 }; |
| 1335 | 1324 |
| 1336 } // namespace views | 1325 } // namespace views |
| 1337 | 1326 |
| 1338 #endif // VIEWS_VIEW_H_ | 1327 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |