| 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 <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // WidgetObserver: | 63 // WidgetObserver: |
| 64 | 64 |
| 65 void OnWidgetDestroying(Widget* widget) override { | 65 void OnWidgetDestroying(Widget* widget) override { |
| 66 auto iter = std::find(widgets_.begin(), widgets_.end(), widget); | 66 auto iter = std::find(widgets_.begin(), widgets_.end(), widget); |
| 67 if (iter != widgets_.end()) | 67 if (iter != widgets_.end()) |
| 68 widgets_.erase(iter); | 68 widgets_.erase(iter); |
| 69 } | 69 } |
| 70 | 70 |
| 71 // ui::AXPlatformNodeDelegate: | 71 // ui::AXPlatformNodeDelegate: |
| 72 | 72 |
| 73 const ui::AXNodeData& GetData() override { | 73 const ui::AXNodeData& GetData() const override { return data_; } |
| 74 return data_; | |
| 75 } | |
| 76 | 74 |
| 77 gfx::NativeWindow GetTopLevelWidget() override { return nullptr; } | 75 gfx::NativeWindow GetTopLevelWidget() override { return nullptr; } |
| 78 | 76 |
| 79 gfx::NativeViewAccessible GetParent() override { | 77 gfx::NativeViewAccessible GetParent() override { |
| 80 return nullptr; | 78 return nullptr; |
| 81 } | 79 } |
| 82 | 80 |
| 83 int GetChildCount() override { | 81 int GetChildCount() override { |
| 84 return static_cast<int>(widgets_.size()); | 82 return static_cast<int>(widgets_.size()); |
| 85 } | 83 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 } | 163 } |
| 166 | 164 |
| 167 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { | 165 gfx::NativeViewAccessible NativeViewAccessibilityAuraLinux::GetParent() { |
| 168 gfx::NativeViewAccessible parent = NativeViewAccessibilityBase::GetParent(); | 166 gfx::NativeViewAccessible parent = NativeViewAccessibilityBase::GetParent(); |
| 169 if (!parent) | 167 if (!parent) |
| 170 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); | 168 parent = AuraLinuxApplication::GetInstance()->GetNativeViewAccessible(); |
| 171 return parent; | 169 return parent; |
| 172 } | 170 } |
| 173 | 171 |
| 174 } // namespace views | 172 } // namespace views |
| OLD | NEW |