Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: base/win/accessibility_misc_utils.h

Issue 10399084: Fix crash in the accessibility code in the shared build. The problem is that the ATL module pointer… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved accessibility_misc_utils.h to ui/base/win and switched STDMETHODIMP->STDMETHOD in the header … Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/base.gypi ('k') | base/win/accessibility_misc_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 #ifndef BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
5 #define BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
6 #pragma once
7
8 #include <atlbase.h>
9 #include <atlcom.h>
10 #include <UIAutomationCore.h>
11
12 #include "base/base_export.h"
13 #include "base/compiler_specific.h"
14
15 namespace base {
16 namespace win {
17
18 // UIA Text provider implementation for edit controls.
19 class BASE_EXPORT UIATextProvider
20 : public NON_EXPORTED_BASE(CComObjectRootEx<CComMultiThreadModel>),
21 public IValueProvider,
22 public ITextProvider {
23 public:
24 BEGIN_COM_MAP(UIATextProvider)
25 COM_INTERFACE_ENTRY2(IUnknown, ITextProvider)
26 COM_INTERFACE_ENTRY(IValueProvider)
27 COM_INTERFACE_ENTRY(ITextProvider)
28 END_COM_MAP()
29
30 UIATextProvider();
31
32 // Creates an instance of the UIATextProvider class.
33 // Returns true on success
34 static bool CreateTextProvider(bool editable, IUnknown** provider);
35
36 void set_editable(bool editable) {
37 editable_ = editable;
38 }
39
40 //
41 // IValueProvider methods.
42 //
43 STDMETHODIMP get_IsReadOnly(BOOL* read_only);
44
45 //
46 // IValueProvider methods not implemented.
47 //
48 STDMETHODIMP SetValue(const wchar_t* val) {
49 return E_NOTIMPL;
50 }
51
52 STDMETHODIMP get_Value(BSTR* value) {
53 return E_NOTIMPL;
54 }
55
56 //
57 // ITextProvider methods.
58 //
59 STDMETHODIMP GetSelection(SAFEARRAY** ret) {
60 return E_NOTIMPL;
61 }
62
63 STDMETHODIMP GetVisibleRanges(SAFEARRAY** ret) {
64 return E_NOTIMPL;
65 }
66
67 STDMETHODIMP RangeFromChild(IRawElementProviderSimple* child,
68 ITextRangeProvider** ret) {
69 return E_NOTIMPL;
70 }
71
72 STDMETHODIMP RangeFromPoint(struct UiaPoint point,
73 ITextRangeProvider** ret) {
74 return E_NOTIMPL;
75 }
76
77 STDMETHODIMP get_DocumentRange(ITextRangeProvider** ret) {
78 return E_NOTIMPL;
79 }
80
81 STDMETHODIMP get_SupportedTextSelection(enum SupportedTextSelection* ret) {
82 return E_NOTIMPL;
83 }
84
85 private:
86 bool editable_;
87 };
88
89 } // win
90 } // base
91
92 #endif // BASE_WIN_ACCESSIBILITY_MISC_UTILS_H_
OLDNEW
« no previous file with comments | « base/base.gypi ('k') | base/win/accessibility_misc_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698