- add sources.
[platform/framework/web/crosswalk.git] / src / ui / views / accessibility / native_view_accessibility.h
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.
4
5 #ifndef UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
6 #define UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_
7
8 #include "ui/base/accessibility/accessibility_types.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/views_export.h"
11
12 namespace views {
13
14 class View;
15
16 class VIEWS_EXPORT NativeViewAccessibility {
17  public:
18   static NativeViewAccessibility* Create(View* view);
19
20   virtual void NotifyAccessibilityEvent(
21       ui::AccessibilityTypes::Event event_type) {}
22
23   virtual gfx::NativeViewAccessible GetNativeObject();
24
25   // Call Destroy rather than deleting this, because the subclass may
26   // use reference counting.
27   virtual void Destroy();
28
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);
34
35  protected:
36   NativeViewAccessibility();
37   virtual ~NativeViewAccessibility();
38
39  private:
40   DISALLOW_COPY_AND_ASSIGN(NativeViewAccessibility);
41 };
42
43 }  // namespace views
44
45 #endif  // UI_VIEWS_ACCESSIBILITY_NATIVE_VIEW_ACCESSIBILITY_H_