| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 562 |
| 563 // Raise an accessibility notification with an option to also raise a native | 563 // Raise an accessibility notification with an option to also raise a native |
| 564 // notification. | 564 // notification. |
| 565 virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type, | 565 virtual void NotifyAccessibilityEvent(AccessibilityTypes::Event event_type, |
| 566 bool send_native_event); | 566 bool send_native_event); |
| 567 | 567 |
| 568 // Returns the MSAA default action of the current view. The string returned | 568 // Returns the MSAA default action of the current view. The string returned |
| 569 // describes the default action that will occur when executing | 569 // describes the default action that will occur when executing |
| 570 // IAccessible::DoDefaultAction. For instance, default action of a button is | 570 // IAccessible::DoDefaultAction. For instance, default action of a button is |
| 571 // 'Press'. | 571 // 'Press'. |
| 572 virtual std::wstring GetAccessibleDefaultAction() { return std::wstring(); } | 572 virtual string16 GetAccessibleDefaultAction() { return string16(); } |
| 573 | 573 |
| 574 // Returns a string containing the mnemonic, or the keyboard shortcut, for a | 574 // Returns a string containing the mnemonic, or the keyboard shortcut, for a |
| 575 // given control. | 575 // given control. |
| 576 virtual std::wstring GetAccessibleKeyboardShortcut() { | 576 virtual string16 GetAccessibleKeyboardShortcut() { |
| 577 return std::wstring(); | 577 return string16(); |
| 578 } | 578 } |
| 579 | 579 |
| 580 // Returns a brief, identifying string, containing a unique, readable name of | 580 // Returns a brief, identifying string, containing a unique, readable name of |
| 581 // a given control. Sets the input string appropriately, and returns true if | 581 // a given control. Sets the input string appropriately, and returns true if |
| 582 // successful. | 582 // successful. |
| 583 bool GetAccessibleName(std::wstring* name); | 583 bool GetAccessibleName(string16* name); |
| 584 | 584 |
| 585 // Returns the accessibility role of the current view. The role is what | 585 // Returns the accessibility role of the current view. The role is what |
| 586 // assistive technologies (ATs) use to determine what behavior to expect from | 586 // assistive technologies (ATs) use to determine what behavior to expect from |
| 587 // a given control. | 587 // a given control. |
| 588 virtual AccessibilityTypes::Role GetAccessibleRole(); | 588 virtual AccessibilityTypes::Role GetAccessibleRole(); |
| 589 | 589 |
| 590 // Returns the accessibility state of the current view. | 590 // Returns the accessibility state of the current view. |
| 591 virtual AccessibilityTypes::State GetAccessibleState() { | 591 virtual AccessibilityTypes::State GetAccessibleState() { |
| 592 return 0; | 592 return 0; |
| 593 } | 593 } |
| 594 | 594 |
| 595 // Returns the current value associated with a view. | 595 // Returns the current value associated with a view. |
| 596 virtual std::wstring GetAccessibleValue() { return std::wstring(); } | 596 virtual string16 GetAccessibleValue() { return string16(); } |
| 597 | 597 |
| 598 // Assigns a string name to the given control. Needed as a View does not know | 598 // Assigns a string name to the given control. Needed as a View does not know |
| 599 // which name will be associated with it until it is created to be a | 599 // which name will be associated with it until it is created to be a |
| 600 // certain type. | 600 // certain type. |
| 601 void SetAccessibleName(const std::wstring& name); | 601 void SetAccessibleName(const string16& name); |
| 602 | 602 |
| 603 // Returns an instance of the (platform-specific) accessibility interface for | 603 // Returns an instance of the (platform-specific) accessibility interface for |
| 604 // the View. | 604 // the View. |
| 605 ViewAccessibility* GetViewAccessibility(); | 605 ViewAccessibility* GetViewAccessibility(); |
| 606 | 606 |
| 607 // Utility functions | 607 // Utility functions |
| 608 | 608 |
| 609 // Note that the utility coordinate conversions functions always operate on | 609 // Note that the utility coordinate conversions functions always operate on |
| 610 // the mirrored position of the child Views if the parent View uses a | 610 // the mirrored position of the child Views if the parent View uses a |
| 611 // right-to-left UI layout. | 611 // right-to-left UI layout. |
| (...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1327 // The default value for how long to wait (in ms) before showing a menu | 1327 // The default value for how long to wait (in ms) before showing a menu |
| 1328 // button on hover. This value is used if the OS doesn't supply one. | 1328 // button on hover. This value is used if the OS doesn't supply one. |
| 1329 static const int kShowFolderDropMenuDelay; | 1329 static const int kShowFolderDropMenuDelay; |
| 1330 | 1330 |
| 1331 DISALLOW_COPY_AND_ASSIGN(View); | 1331 DISALLOW_COPY_AND_ASSIGN(View); |
| 1332 }; | 1332 }; |
| 1333 | 1333 |
| 1334 } // namespace views | 1334 } // namespace views |
| 1335 | 1335 |
| 1336 #endif // VIEWS_VIEW_H_ | 1336 #endif // VIEWS_VIEW_H_ |
| OLD | NEW |