OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #include "ui/views/accessibility/ax_widget_obj_wrapper.h" | |
6 | |
7 #include "ui/accessibility/ax_node_data.h" | |
8 #include "ui/views/accessibility/ax_node_source_obj_wrapper.h" | |
9 #include "ui/views/accessibility/ax_obj_cache.h" | |
10 #include "ui/views/widget/widget.h" | |
11 | |
12 namespace views { | |
13 | |
14 AXNodeSourceObjWrapper* AXWidgetObjWrapper::GetParent() { | |
15 // TODO(dtseng): This could possibly hook up to other platforms. | |
16 #ifdef USE_AURA | |
dmazzoni
2014/04/23 05:06:44
Do we even want to compile this code on any non-Au
David Tseng
2014/04/23 18:20:01
sgtm; removed.
| |
17 return AXObjCache::GetInstance()->GetOrCreate(widget_->GetNativeView()); | |
18 #endif | |
19 return NULL; | |
20 } | |
21 | |
22 void AXWidgetObjWrapper::GetChildren( | |
23 std::vector<AXNodeSourceObjWrapper*>* out_children) { | |
24 out_children->push_back( | |
25 AXObjCache::GetInstance()->GetOrCreate(widget_->GetRootView())); | |
26 } | |
27 | |
28 void AXWidgetObjWrapper::Serialize(ui::AXNodeData* out_node_data) { | |
29 out_node_data->id = AXObjCache::GetInstance()->GetID(widget_); | |
30 out_node_data->role = ui::AX_ROLE_CLIENT; | |
31 out_node_data->location = widget_->GetWindowBoundsInScreen(); | |
32 } | |
33 | |
34 } // namespace views | |
OLD | NEW |