OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <atlbase.h> | 9 #include <atlbase.h> |
10 #include <atlcom.h> | 10 #include <atlcom.h> |
(...skipping 22 matching lines...) Expand all Loading... | |
33 // communication of accessibility information, providing accessibility | 33 // communication of accessibility information, providing accessibility |
34 // to be used by screen readers and other assistive technology (AT). | 34 // to be used by screen readers and other assistive technology (AT). |
35 // | 35 // |
36 //////////////////////////////////////////////////////////////////////////////// | 36 //////////////////////////////////////////////////////////////////////////////// |
37 class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79")) | 37 class __declspec(uuid("562072fe-3390-43b1-9e2c-dd4118f5ac79")) |
38 BrowserAccessibilityWin | 38 BrowserAccessibilityWin |
39 : public BrowserAccessibility, | 39 : public BrowserAccessibility, |
40 public CComObjectRootEx<CComMultiThreadModel>, | 40 public CComObjectRootEx<CComMultiThreadModel>, |
41 public IDispatchImpl<IAccessible2, &IID_IAccessible2, | 41 public IDispatchImpl<IAccessible2, &IID_IAccessible2, |
42 &LIBID_IAccessible2Lib>, | 42 &LIBID_IAccessible2Lib>, |
43 public IAccessibleHyperlink, | |
44 public IAccessibleHypertext, | |
43 public IAccessibleImage, | 45 public IAccessibleImage, |
44 public IAccessibleTable, | 46 public IAccessibleTable, |
45 public IAccessibleTable2, | 47 public IAccessibleTable2, |
46 public IAccessibleTableCell, | 48 public IAccessibleTableCell, |
47 public IAccessibleText, | |
48 public IAccessibleValue, | 49 public IAccessibleValue, |
49 public IServiceProvider, | 50 public IServiceProvider, |
50 public ISimpleDOMDocument, | 51 public ISimpleDOMDocument, |
51 public ISimpleDOMNode, | 52 public ISimpleDOMNode, |
52 public ISimpleDOMText { | 53 public ISimpleDOMText { |
53 public: | 54 public: |
54 BEGIN_COM_MAP(BrowserAccessibilityWin) | 55 BEGIN_COM_MAP(BrowserAccessibilityWin) |
55 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2) | 56 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2) |
56 COM_INTERFACE_ENTRY2(IAccessible, IAccessible2) | 57 COM_INTERFACE_ENTRY2(IAccessible, IAccessible2) |
58 COM_INTERFACE_ENTRY2(IAccessibleText, IAccessibleHypertext) | |
57 COM_INTERFACE_ENTRY(IAccessible2) | 59 COM_INTERFACE_ENTRY(IAccessible2) |
60 COM_INTERFACE_ENTRY(IAccessibleHyperlink) | |
61 COM_INTERFACE_ENTRY(IAccessibleHypertext) | |
58 COM_INTERFACE_ENTRY(IAccessibleImage) | 62 COM_INTERFACE_ENTRY(IAccessibleImage) |
59 COM_INTERFACE_ENTRY(IAccessibleTable) | 63 COM_INTERFACE_ENTRY(IAccessibleTable) |
60 COM_INTERFACE_ENTRY(IAccessibleTable2) | 64 COM_INTERFACE_ENTRY(IAccessibleTable2) |
61 COM_INTERFACE_ENTRY(IAccessibleTableCell) | 65 COM_INTERFACE_ENTRY(IAccessibleTableCell) |
62 COM_INTERFACE_ENTRY(IAccessibleText) | |
63 COM_INTERFACE_ENTRY(IAccessibleValue) | 66 COM_INTERFACE_ENTRY(IAccessibleValue) |
64 COM_INTERFACE_ENTRY(IServiceProvider) | 67 COM_INTERFACE_ENTRY(IServiceProvider) |
65 COM_INTERFACE_ENTRY(ISimpleDOMDocument) | 68 COM_INTERFACE_ENTRY(ISimpleDOMDocument) |
66 COM_INTERFACE_ENTRY(ISimpleDOMNode) | 69 COM_INTERFACE_ENTRY(ISimpleDOMNode) |
67 COM_INTERFACE_ENTRY(ISimpleDOMText) | 70 COM_INTERFACE_ENTRY(ISimpleDOMText) |
68 END_COM_MAP() | 71 END_COM_MAP() |
69 | 72 |
70 CONTENT_EXPORT BrowserAccessibilityWin(); | 73 CONTENT_EXPORT BrowserAccessibilityWin(); |
71 | 74 |
72 CONTENT_EXPORT virtual ~BrowserAccessibilityWin(); | 75 CONTENT_EXPORT virtual ~BrowserAccessibilityWin(); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
471 return E_NOTIMPL; | 474 return E_NOTIMPL; |
472 } | 475 } |
473 CONTENT_EXPORT STDMETHODIMP scrollSubstringToPoint(LONG start_index, | 476 CONTENT_EXPORT STDMETHODIMP scrollSubstringToPoint(LONG start_index, |
474 LONG end_index, | 477 LONG end_index, |
475 enum IA2CoordinateType coordinate_type, | 478 enum IA2CoordinateType coordinate_type, |
476 LONG x, LONG y) { | 479 LONG x, LONG y) { |
477 return E_NOTIMPL; | 480 return E_NOTIMPL; |
478 } | 481 } |
479 | 482 |
480 // | 483 // |
484 // IAccessibleHypertext methods. | |
485 // | |
486 | |
487 CONTENT_EXPORT STDMETHODIMP get_nHyperlinks(long* hyperlinkCount); | |
488 | |
489 CONTENT_EXPORT STDMETHODIMP get_hyperlink( | |
490 long index, | |
491 IAccessibleHyperlink** hyperlink); | |
492 | |
493 CONTENT_EXPORT STDMETHODIMP get_hyperlinkIndex(long char_index, | |
494 long* hyperlink_index); | |
495 | |
496 // IAccessibleHyperlink not implemented. | |
497 CONTENT_EXPORT STDMETHODIMP get_anchor(long index, VARIANT* anchor) { | |
498 return E_NOTIMPL; | |
499 } | |
500 CONTENT_EXPORT STDMETHODIMP get_anchorTarget(long index, | |
dmazzoni
2011/10/28 17:33:53
Nit: fit all arguments on one line or all on separ
David Tseng
2011/10/28 18:25:15
Done.
| |
501 VARIANT* anchorTarget) { | |
502 return E_NOTIMPL; | |
503 } | |
504 CONTENT_EXPORT STDMETHODIMP get_startIndex( long* index) { | |
505 return E_NOTIMPL; | |
506 } | |
507 CONTENT_EXPORT STDMETHODIMP get_endIndex( long* index) { | |
508 return E_NOTIMPL; | |
509 } | |
510 CONTENT_EXPORT STDMETHODIMP get_valid(boolean* valid) { | |
511 return E_NOTIMPL; | |
512 } | |
513 | |
514 // IAccessibleAction not implemented. | |
515 CONTENT_EXPORT STDMETHODIMP nActions(long* nActions) { | |
516 return E_NOTIMPL; | |
517 } | |
518 CONTENT_EXPORT STDMETHODIMP doAction(long actionIndex) { | |
519 return E_NOTIMPL; | |
520 } | |
521 CONTENT_EXPORT STDMETHODIMP get_description( | |
522 long actionIndex, | |
523 BSTR* description) { | |
524 return E_NOTIMPL; | |
525 } | |
526 CONTENT_EXPORT STDMETHODIMP get_keyBinding( | |
527 long actionIndex, | |
528 long nMaxBindings, | |
529 BSTR** keyBindings, | |
530 long* nBindings) { | |
531 return E_NOTIMPL; | |
532 } | |
533 CONTENT_EXPORT STDMETHODIMP get_name(long actionIndex, BSTR* name) { | |
534 return E_NOTIMPL; | |
535 } | |
536 CONTENT_EXPORT STDMETHODIMP get_localizedName(long actionIndex, | |
537 BSTR* localizedName) { | |
538 return E_NOTIMPL; | |
539 } | |
540 | |
541 // | |
481 // IAccessibleValue methods. | 542 // IAccessibleValue methods. |
482 // | 543 // |
483 | 544 |
484 CONTENT_EXPORT STDMETHODIMP get_currentValue(VARIANT* value); | 545 CONTENT_EXPORT STDMETHODIMP get_currentValue(VARIANT* value); |
485 | 546 |
486 CONTENT_EXPORT STDMETHODIMP get_minimumValue(VARIANT* value); | 547 CONTENT_EXPORT STDMETHODIMP get_minimumValue(VARIANT* value); |
487 | 548 |
488 CONTENT_EXPORT STDMETHODIMP get_maximumValue(VARIANT* value); | 549 CONTENT_EXPORT STDMETHODIMP get_maximumValue(VARIANT* value); |
489 | 550 |
490 CONTENT_EXPORT STDMETHODIMP setCurrentValue(VARIANT new_value); | 551 CONTENT_EXPORT STDMETHODIMP setCurrentValue(VARIANT new_value); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
708 string16 previous_text_; | 769 string16 previous_text_; |
709 | 770 |
710 // The old text to return in IAccessibleText::get_oldText - this is like | 771 // The old text to return in IAccessibleText::get_oldText - this is like |
711 // previous_text_ except that it's NOT updated when the object | 772 // previous_text_ except that it's NOT updated when the object |
712 // is initialized again but the text doesn't change. | 773 // is initialized again but the text doesn't change. |
713 string16 old_text_; | 774 string16 old_text_; |
714 | 775 |
715 // Relationships between this node and other nodes. | 776 // Relationships between this node and other nodes. |
716 std::vector<BrowserAccessibilityRelation*> relations_; | 777 std::vector<BrowserAccessibilityRelation*> relations_; |
717 | 778 |
779 // The text of this node including embedded hyperlink characters. | |
780 string16 hypertext_; | |
781 | |
782 // Maps the |hypertext_| embedded character offset to a child of |children_|. | |
783 std::map<int32, int32> hyperlink_offset_to_index_; | |
784 | |
718 // Give BrowserAccessibility::Create access to our constructor. | 785 // Give BrowserAccessibility::Create access to our constructor. |
719 friend class BrowserAccessibility; | 786 friend class BrowserAccessibility; |
720 friend class BrowserAccessibilityRelation; | 787 friend class BrowserAccessibilityRelation; |
721 | 788 |
722 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 789 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
723 }; | 790 }; |
724 | 791 |
725 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 792 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
OLD | NEW |