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

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

Issue 9958139: Add support for UIA accessibility interfaces like IAccessibleEx and IRawElementProviderSimple. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
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 #include "base/win/accessibility_misc_utils.h"
5
6 #include "base/logging.h"
7
8 namespace base {
9 namespace win {
10
11 // UIA TextProvider implementation.
12 UIATextProvider::UIATextProvider()
13 : editable_(false) {}
14
15 // static
16 bool UIATextProvider::CreateTextProvider(bool editable, IUnknown** provider) {
17 CComObject<UIATextProvider>* text_provider = NULL;
18 HRESULT hr = CComObject<UIATextProvider>::CreateInstance(&text_provider);
19 if (SUCCEEDED(hr)) {
20 DCHECK(text_provider);
21 text_provider->set_editable(editable);
22 text_provider->AddRef();
23 *provider = static_cast<ITextProvider*>(text_provider);
24 return true;
25 }
26 return false;
27 }
28
29 STDMETHODIMP UIATextProvider::get_IsReadOnly(BOOL* read_only) {
30 *read_only = !editable_;
31 return S_OK;
32 }
33
34 } // namespace win
35 } // namespace base
OLDNEW
« no previous file with comments | « base/win/accessibility_misc_utils.h ('k') | content/browser/accessibility/browser_accessibility_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698