diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 09:12:21 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-06 09:12:21 +0000 |
commit | 3fe2d9e6b0319e972b72beb5082d5486f7cb26d0 (patch) | |
tree | b879ece463c5de34a90c53b4f1d5af4f23544fe0 /ui/views/accessibility/native_view_accessibility.h | |
parent | 3bc8e9fc0d76910b4550e9109a5a30f51f98d9c9 (diff) | |
download | chromium_src-3fe2d9e6b0319e972b72beb5082d5486f7cb26d0.zip chromium_src-3fe2d9e6b0319e972b72beb5082d5486f7cb26d0.tar.gz chromium_src-3fe2d9e6b0319e972b72beb5082d5486f7cb26d0.tar.bz2 |
Implement Windows accessibility for Aura.
Windows accessibility requires posting notifications
on an HWND, then listening for messages on that HWND
and routing them back to the appropriate child object.
Before, that code was implemented in NativeWidgetWin
because a NativeWidget corresponded to an HWND.
Now with Aura, a Widget doesn't necessarily have an
HWND, so there's now a new class,
NativeWidgetAccessibilityWin, that's a companion to
NativeViewAccessibilityWin and handles this abstraction.
Refactored some code so that we don't need screen
reader detection or dynamic HWND annotation (in
methods like SetAccessibilityRole, etc.) anymore.
Tested with Windows screen readers. Web content is
still not accessible in Aura, that will be the next
changelist. Win 8 in Metro mode is not accessible yet,
that's going to require further changes.
BUG=175156
Review URL: https://chromiumcodereview.appspot.com/12335075
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/accessibility/native_view_accessibility.h')
-rw-r--r-- | ui/views/accessibility/native_view_accessibility.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/ui/views/accessibility/native_view_accessibility.h b/ui/views/accessibility/native_view_accessibility.h new file mode 100644 index 0000000..add7f97 --- /dev/null +++ b/ui/views/accessibility/native_view_accessibility.h @@ -0,0 +1,38 @@ +// Copyright (c) 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ +#define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ + +#include "ui/base/accessibility/accessibility_types.h" +#include "ui/gfx/native_widget_types.h" + +namespace views { + +class View; + +class NativeViewAccessibility { + public: + static NativeViewAccessibility* Create(View* view); + + virtual void NotifyAccessibilityEvent( + ui::AccessibilityTypes::Event event_type) {} + + virtual gfx::NativeViewAccessible GetNativeObject(); + + // Call Destroy rather than deleting this, because the subclass may + // use reference counting. + virtual void Destroy(); + + protected: + NativeViewAccessibility(); + virtual ~NativeViewAccessibility(); + + private: + DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibility); +}; + +} // namespace views + +#endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_ |