Make castv2 performance test work.
[chromium-blink-merge.git] / ui / views / accessibility / ax_widget_obj_wrapper.h
blobd6c3e48fbcc1c7605127ff55005c509a26123921
1 // Copyright 2014 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_AX_WIDGET_OBJ_WRAPPER_H_
6 #define UI_VIEWS_ACCESSIBILITY_AX_WIDGET_OBJ_WRAPPER_H_
8 #include "ui/views/accessibility/ax_aura_obj_wrapper.h"
9 #include "ui/views/widget/widget_observer.h"
10 #include "ui/views/widget/widget_removals_observer.h"
12 namespace views {
13 class Widget;
15 // Describes a |Widget| for use with other AX classes.
16 class AXWidgetObjWrapper : public AXAuraObjWrapper,
17 public WidgetObserver,
18 public WidgetRemovalsObserver {
19 public:
20 explicit AXWidgetObjWrapper(Widget* widget);
21 ~AXWidgetObjWrapper() override;
23 // AXAuraObjWrapper overrides.
24 AXAuraObjWrapper* GetParent() override;
25 void GetChildren(std::vector<AXAuraObjWrapper*>* out_children) override;
26 void Serialize(ui::AXNodeData* out_node_data) override;
27 int32 GetID() override;
29 // WidgetObserver overrides.
30 void OnWidgetDestroying(Widget* widget) override;
32 // WidgetRemovalsObserver overrides.
33 void OnWillRemoveView(Widget* widget, View* view) override;
35 private:
36 Widget* widget_;
38 DISALLOW_COPY_AND_ASSIGN(AXWidgetObjWrapper);
41 } // namespace views
43 #endif // UI_VIEWS_ACCESSIBILITY_AX_WIDGET_OBJ_WRAPPER_H_