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

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 246773008: RWHI should implement BrowserAccessibilityDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac tests Created 6 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 | Annotate | Revision Log
OLDNEW
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 4
5 #include "content/browser/accessibility/browser_accessibility_win.h" 5 #include "content/browser/accessibility/browser_accessibility_win.h"
6 6
7 #include <UIAutomationClient.h> 7 #include <UIAutomationClient.h>
8 #include <UIAutomationCoreApi.h> 8 #include <UIAutomationCoreApi.h>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 2801 matching lines...) Expand 10 before | Expand all | Expand 10 after
2812 } 2812 }
2813 2813
2814 STDMETHODIMP BrowserAccessibilityWin::GetPatternProvider(PATTERNID id, 2814 STDMETHODIMP BrowserAccessibilityWin::GetPatternProvider(PATTERNID id,
2815 IUnknown** provider) { 2815 IUnknown** provider) {
2816 DVLOG(1) << "In Function: " 2816 DVLOG(1) << "In Function: "
2817 << __FUNCTION__ 2817 << __FUNCTION__
2818 << " for pattern id: " 2818 << " for pattern id: "
2819 << id; 2819 << id;
2820 if (id == UIA_ValuePatternId || id == UIA_TextPatternId) { 2820 if (id == UIA_ValuePatternId || id == UIA_TextPatternId) {
2821 if (IsEditableText()) { 2821 if (IsEditableText()) {
2822 // The BrowserAccessibilityManager keeps track of instances when
2823 // we don't want to show the on-screen keyboard.
2824 if (!manager()->IsOSKAllowed(GetGlobalBoundsRect()))
2825 return E_NOTIMPL;
2826
2827 DVLOG(1) << "Returning UIA text provider"; 2822 DVLOG(1) << "Returning UIA text provider";
2828 base::win::UIATextProvider::CreateTextProvider(true, provider); 2823 base::win::UIATextProvider::CreateTextProvider(true, provider);
2829 return S_OK; 2824 return S_OK;
2830 } 2825 }
2831 } 2826 }
2832 return E_NOTIMPL; 2827 return E_NOTIMPL;
2833 } 2828 }
2834 2829
2835 STDMETHODIMP BrowserAccessibilityWin::GetPropertyValue(PROPERTYID id, 2830 STDMETHODIMP BrowserAccessibilityWin::GetPropertyValue(PROPERTYID id,
2836 VARIANT* ret) { 2831 VARIANT* ret) {
(...skipping 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
3788 // The role should always be set. 3783 // The role should always be set.
3789 DCHECK(!role_name_.empty() || ia_role_); 3784 DCHECK(!role_name_.empty() || ia_role_);
3790 3785
3791 // If we didn't explicitly set the IAccessible2 role, make it the same 3786 // If we didn't explicitly set the IAccessible2 role, make it the same
3792 // as the MSAA role. 3787 // as the MSAA role.
3793 if (!ia2_role_) 3788 if (!ia2_role_)
3794 ia2_role_ = ia_role_; 3789 ia2_role_ = ia_role_;
3795 } 3790 }
3796 3791
3797 } // namespace content 3792 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698