| 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 "chrome/browser/ui/aura/accessibility/ax_root_obj_wrapper.h" | 5 #include "chrome/browser/ui/aura/accessibility/ax_root_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_node_data.h" | 9 #include "ui/accessibility/ax_node_data.h" |
| 10 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 return std::find(children.begin(), children.end(), child) != children.end(); | 39 return std::find(children.begin(), children.end(), child) != children.end(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 views::AXAuraObjWrapper* AXRootObjWrapper::GetParent() { | 42 views::AXAuraObjWrapper* AXRootObjWrapper::GetParent() { |
| 43 return NULL; | 43 return NULL; |
| 44 } | 44 } |
| 45 | 45 |
| 46 void AXRootObjWrapper::GetChildren( | 46 void AXRootObjWrapper::GetChildren( |
| 47 std::vector<views::AXAuraObjWrapper*>* out_children) { | 47 std::vector<views::AXAuraObjWrapper*>* out_children) { |
| 48 views::AXAuraObjCache::GetInstance()->GetTopLevelWindows(out_children); | 48 views::AXAuraObjCache::GetInstance()->GetTopLevelWindows(out_children); |
| 49 out_children->push_back( |
| 50 views::AXAuraObjCache::GetInstance()->GetOrCreate(alert_window_)); |
| 49 } | 51 } |
| 50 | 52 |
| 51 void AXRootObjWrapper::Serialize(ui::AXNodeData* out_node_data) { | 53 void AXRootObjWrapper::Serialize(ui::AXNodeData* out_node_data) { |
| 52 out_node_data->id = id_; | 54 out_node_data->id = id_; |
| 53 out_node_data->role = ui::AX_ROLE_DESKTOP; | 55 out_node_data->role = ui::AX_ROLE_DESKTOP; |
| 54 // TODO(dtseng): Apply a richer set of states. | 56 // TODO(dtseng): Apply a richer set of states. |
| 55 out_node_data->state = 0; | 57 out_node_data->state = 0; |
| 56 } | 58 } |
| 57 | 59 |
| 58 int32_t AXRootObjWrapper::GetID() { | 60 int32_t AXRootObjWrapper::GetID() { |
| 59 return id_; | 61 return id_; |
| 60 } | 62 } |
| OLD | NEW |