1 // Copyright (c) 2013 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.
5 #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
8 #include "ui/base/accessibility/accessibility_types.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/views_export.h"
16 class VIEWS_EXPORT NativeViewAccessibility {
18 static NativeViewAccessibility* Create(View* view);
20 virtual void NotifyAccessibilityEvent(
21 ui::AccessibilityTypes::Event event_type) {}
23 virtual gfx::NativeViewAccessible GetNativeObject();
25 // Call Destroy rather than deleting this, because the subclass may
26 // use reference counting.
27 virtual void Destroy();
29 // WebViews need to be registered because they implement their own
30 // tree of accessibility objects, and we need to check them when
31 // mapping a child id to a NativeViewAccessible.
32 static void RegisterWebView(View* web_view);
33 static void UnregisterWebView(View* web_view);
36 NativeViewAccessibility();
37 virtual ~NativeViewAccessibility();
40 DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibility);
45 #endif // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_