| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/views/accessibility/ax_view_obj_wrapper.h" | 5 #include "ui/views/accessibility/ax_view_obj_wrapper.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "ui/accessibility/ax_node_data.h" | 8 #include "ui/accessibility/ax_node_data.h" |
| 9 #include "ui/accessibility/ax_view_state.h" | 9 #include "ui/accessibility/ax_view_state.h" |
| 10 #include "ui/events/event_utils.h" | 10 #include "ui/events/event_utils.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 if (view_->GetWidget()) | 29 if (view_->GetWidget()) |
| 30 return cache->GetOrCreate(view_->GetWidget()); | 30 return cache->GetOrCreate(view_->GetWidget()); |
| 31 | 31 |
| 32 return NULL; | 32 return NULL; |
| 33 } | 33 } |
| 34 | 34 |
| 35 void AXViewObjWrapper::GetChildren( | 35 void AXViewObjWrapper::GetChildren( |
| 36 std::vector<AXAuraObjWrapper*>* out_children) { | 36 std::vector<AXAuraObjWrapper*>* out_children) { |
| 37 // TODO(dtseng): Need to handle |Widget| child of |View|. | 37 // TODO(dtseng): Need to handle |Widget| child of |View|. |
| 38 for (int i = 0; i < view_->child_count(); ++i) { | 38 for (int i = 0; i < view_->child_count(); ++i) { |
| 39 if (!view_->child_at(i)->visible()) |
| 40 continue; |
| 41 |
| 39 AXAuraObjWrapper* child = | 42 AXAuraObjWrapper* child = |
| 40 AXAuraObjCache::GetInstance()->GetOrCreate(view_->child_at(i)); | 43 AXAuraObjCache::GetInstance()->GetOrCreate(view_->child_at(i)); |
| 41 out_children->push_back(child); | 44 out_children->push_back(child); |
| 42 } | 45 } |
| 43 } | 46 } |
| 44 | 47 |
| 45 void AXViewObjWrapper::Serialize(ui::AXNodeData* out_node_data) { | 48 void AXViewObjWrapper::Serialize(ui::AXNodeData* out_node_data) { |
| 46 ui::AXViewState view_data; | 49 ui::AXViewState view_data; |
| 47 view_->GetAccessibleState(&view_data); | 50 view_->GetAccessibleState(&view_data); |
| 48 | 51 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void AXViewObjWrapper::SetSelection(int32_t start, int32_t end) { | 102 void AXViewObjWrapper::SetSelection(int32_t start, int32_t end) { |
| 100 // TODO(dtseng): Implement. | 103 // TODO(dtseng): Implement. |
| 101 } | 104 } |
| 102 | 105 |
| 103 void AXViewObjWrapper::ShowContextMenu() { | 106 void AXViewObjWrapper::ShowContextMenu() { |
| 104 view_->ShowContextMenu(view_->bounds().CenterPoint(), | 107 view_->ShowContextMenu(view_->bounds().CenterPoint(), |
| 105 ui::MENU_SOURCE_KEYBOARD); | 108 ui::MENU_SOURCE_KEYBOARD); |
| 106 } | 109 } |
| 107 | 110 |
| 108 } // namespace views | 111 } // namespace views |
| OLD | NEW |