| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_base.h" | 5 #include "ui/views/accessibility/native_view_accessibility_base.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "ui/events/event_utils.h" | 9 #include "ui/events/event_utils.h" |
| 10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 if (parent_widget_) | 119 if (parent_widget_) |
| 120 return parent_widget_->GetRootView()->GetNativeViewAccessible(); | 120 return parent_widget_->GetRootView()->GetNativeViewAccessible(); |
| 121 | 121 |
| 122 return nullptr; | 122 return nullptr; |
| 123 } | 123 } |
| 124 | 124 |
| 125 gfx::Vector2d NativeViewAccessibilityBase::GetGlobalCoordinateOffset() { | 125 gfx::Vector2d NativeViewAccessibilityBase::GetGlobalCoordinateOffset() { |
| 126 return gfx::Vector2d(0, 0); // location is already in screen coordinates. | 126 return gfx::Vector2d(0, 0); // location is already in screen coordinates. |
| 127 } | 127 } |
| 128 | 128 |
| 129 gfx::Rect NativeViewAccessibilityBase::GetScreenBoundsRect() const { |
| 130 NOTREACHED(); |
| 131 return gfx::Rect(0, 0, 0, 0); |
| 132 } |
| 133 |
| 129 gfx::NativeViewAccessible NativeViewAccessibilityBase::HitTestSync(int x, | 134 gfx::NativeViewAccessible NativeViewAccessibilityBase::HitTestSync(int x, |
| 130 int y) { | 135 int y) { |
| 131 if (!view_ || !view_->GetWidget()) | 136 if (!view_ || !view_->GetWidget()) |
| 132 return nullptr; | 137 return nullptr; |
| 133 | 138 |
| 134 // Search child widgets first, since they're on top in the z-order. | 139 // Search child widgets first, since they're on top in the z-order. |
| 135 std::vector<Widget*> child_widgets; | 140 std::vector<Widget*> child_widgets; |
| 136 PopulateChildWidgetVector(&child_widgets); | 141 PopulateChildWidgetVector(&child_widgets); |
| 137 for (Widget* child_widget : child_widgets) { | 142 for (Widget* child_widget : child_widgets) { |
| 138 View* child_root_view = child_widget->GetRootView(); | 143 View* child_root_view = child_widget->GetRootView(); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 child_widget_platform_node->GetDelegate()); | 261 child_widget_platform_node->GetDelegate()); |
| 257 if (child_widget_view_accessibility->parent_widget() != widget) | 262 if (child_widget_view_accessibility->parent_widget() != widget) |
| 258 child_widget_view_accessibility->SetParentWidget(widget); | 263 child_widget_view_accessibility->SetParentWidget(widget); |
| 259 } | 264 } |
| 260 | 265 |
| 261 result_child_widgets->push_back(child_widget); | 266 result_child_widgets->push_back(child_widget); |
| 262 } | 267 } |
| 263 } | 268 } |
| 264 | 269 |
| 265 } // namespace views | 270 } // namespace views |
| OLD | NEW |