| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/native_view_accessibility_auralinux.h" | 5 #include "ui/views/accessibility/native_view_accessibility_auralinux.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 } | 39 } |
| 40 | 40 |
| 41 // Called every time we create a new accessibility on a View. | 41 // Called every time we create a new accessibility on a View. |
| 42 // Add the top-level widget to our registry so that we can enumerate all | 42 // Add the top-level widget to our registry so that we can enumerate all |
| 43 // top-level widgets. | 43 // top-level widgets. |
| 44 void RegisterWidget(Widget* widget) { | 44 void RegisterWidget(Widget* widget) { |
| 45 if (!widget) | 45 if (!widget) |
| 46 return; | 46 return; |
| 47 | 47 |
| 48 widget = widget->GetTopLevelWidget(); | 48 widget = widget->GetTopLevelWidget(); |
| 49 if (ContainsValue(widgets_, widget)) | 49 if (base::ContainsValue(widgets_, widget)) |
| 50 return; | 50 return; |
| 51 | 51 |
| 52 widgets_.push_back(widget); | 52 widgets_.push_back(widget); |
| 53 widget->AddObserver(this); | 53 widget->AddObserver(this); |
| 54 } | 54 } |
| 55 | 55 |
| 56 gfx::NativeViewAccessible GetNativeViewAccessible() { | 56 gfx::NativeViewAccessible GetNativeViewAccessible() { |
| 57 return platform_node_->GetNativeViewAccessible(); | 57 return platform_node_->GetNativeViewAccessible(); |
| 58 } | 58 } |
| 59 | 59 |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 } | 163 } |
| 164 | 164 |
| 165 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { | 165 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { |
| 166 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent(); | 166 gfx::NativeViewAccessible parent = NativeViewAccessibility::GetParent(); |
| 167 if (!parent) | 167 if (!parent) |
| 168 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); | 168 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); |
| 169 return parent; | 169 return parent; |
| 170 } | 170 } |
| 171 | 171 |
| 172 } // namespace views | 172 } // namespace views |
| OLD | NEW |