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