| 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_window_obj_wrapper.h" | 5 #include "ui/views/accessibility/ax_window_obj_wrapper.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "ui/accessibility/ax_node_data.h" | 10 #include "ui/accessibility/ax_node_data.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 const HierarchyChangeParams& params) { | 80 const HierarchyChangeParams& params) { |
| 81 if (params.phase == WindowObserver::HierarchyChangeParams::HIERARCHY_CHANGED) | 81 if (params.phase == WindowObserver::HierarchyChangeParams::HIERARCHY_CHANGED) |
| 82 AXAuraObjCache::GetInstance()->Remove(params.target, params.old_parent); | 82 AXAuraObjCache::GetInstance()->Remove(params.target, params.old_parent); |
| 83 } | 83 } |
| 84 | 84 |
| 85 void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window, | 85 void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window, |
| 86 const gfx::Rect& old_bounds, | 86 const gfx::Rect& old_bounds, |
| 87 const gfx::Rect& new_bounds) { | 87 const gfx::Rect& new_bounds) { |
| 88 Widget* widget = Widget::GetWidgetForNativeView(window); | 88 Widget* widget = Widget::GetWidgetForNativeView(window); |
| 89 if (widget) { | 89 if (widget) { |
| 90 widget->GetRootView()->NotifyAccessibilityEvent( | 90 views::View* view = widget->GetRootView(); |
| 91 ui::AX_EVENT_LOCATION_CHANGED, true); | 91 if (view) { |
| 92 view->NotifyAccessibilityEvent(ui::AX_EVENT_LOCATION_CHANGED, true); |
| 93 } |
| 92 } | 94 } |
| 93 } | 95 } |
| 94 | 96 |
| 95 } // namespace views | 97 } // namespace views |
| OLD | NEW |