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 #ifndef UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ | 4 #ifndef UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ |
5 #define UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ | 5 #define UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlcom.h> | 8 #include <atlcom.h> |
9 #include <UIAutomationCore.h> | 9 #include <UIAutomationCore.h> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "ui/base/ui_export.h" | 12 #include "ui/base/ui_export.h" |
13 #include "ui/gfx/rect.h" | |
14 | 13 |
15 namespace base { | 14 namespace base { |
16 namespace win { | 15 namespace win { |
17 | 16 |
18 // This is used when we draw our own caret. Updates the system caret rect | 17 // UIA Text provider implementation for edit controls. |
19 // to the given bounding rectangle but makes it invisible. This allows | |
20 // utilities that help the user find the system caret to continue to work. | |
21 // |hwnd| should be the owning window, and |caret_rect| is in global | |
22 // screen coordinates. | |
23 UI_EXPORT void SetInvisibleSystemCaretRect(HWND hwnd, | |
24 const gfx::Rect& caret_rect); | |
25 | |
26 // UIA Text provider implementation for edit controls. | |
27 class UI_EXPORT UIATextProvider | 18 class UI_EXPORT UIATextProvider |
28 : public NON_EXPORTED_BASE(CComObjectRootEx<CComMultiThreadModel>), | 19 : public NON_EXPORTED_BASE(CComObjectRootEx<CComMultiThreadModel>), |
29 public IValueProvider, | 20 public IValueProvider, |
30 public ITextProvider { | 21 public ITextProvider { |
31 public: | 22 public: |
32 BEGIN_COM_MAP(UIATextProvider) | 23 BEGIN_COM_MAP(UIATextProvider) |
33 COM_INTERFACE_ENTRY2(IUnknown, ITextProvider) | 24 COM_INTERFACE_ENTRY2(IUnknown, ITextProvider) |
34 COM_INTERFACE_ENTRY(IValueProvider) | 25 COM_INTERFACE_ENTRY(IValueProvider) |
35 COM_INTERFACE_ENTRY(ITextProvider) | 26 COM_INTERFACE_ENTRY(ITextProvider) |
36 END_COM_MAP() | 27 END_COM_MAP() |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 82 } |
92 | 83 |
93 private: | 84 private: |
94 bool editable_; | 85 bool editable_; |
95 }; | 86 }; |
96 | 87 |
97 } // win | 88 } // win |
98 } // base | 89 } // base |
99 | 90 |
100 #endif // UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ | 91 #endif // UI_BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_ |
OLD | NEW |