Chromium Code Reviews| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 97 void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window, | 97 void AXWindowObjWrapper::OnWindowBoundsChanged(aura::Window* window, |
| 98 const gfx::Rect& old_bounds, | 98 const gfx::Rect& old_bounds, |
| 99 const gfx::Rect& new_bounds) { | 99 const gfx::Rect& new_bounds) { |
| 100 if (window != window_) | 100 if (window != window_) |
| 101 return; | 101 return; |
| 102 | 102 |
| 103 AXAuraObjCache::GetInstance()->FireEvent(this, ui::AX_EVENT_LOCATION_CHANGED); | 103 AXAuraObjCache::GetInstance()->FireEvent(this, ui::AX_EVENT_LOCATION_CHANGED); |
| 104 | 104 |
| 105 Widget* widget = Widget::GetWidgetForNativeView(window); | 105 Widget* widget = Widget::GetWidgetForNativeView(window); |
| 106 if (widget) { | 106 if (widget) { |
| 107 widget->GetRootView()->NotifyAccessibilityEvent( | 107 views::View* view = widget->GetRootView(); |
|
varkha
2017/05/09 07:00:57
nit: s/view/root_view
| |
| 108 ui::AX_EVENT_LOCATION_CHANGED, true); | 108 if (view) { |
|
varkha
2017/05/09 07:00:57
nit: no {}
| |
| 109 view->NotifyAccessibilityEvent(ui::AX_EVENT_LOCATION_CHANGED, true); | |
| 110 } | |
| 109 } | 111 } |
| 110 } | 112 } |
| 111 | 113 |
| 112 void AXWindowObjWrapper::OnWindowPropertyChanged(aura::Window* window, | 114 void AXWindowObjWrapper::OnWindowPropertyChanged(aura::Window* window, |
| 113 const void* key, | 115 const void* key, |
| 114 intptr_t old) { | 116 intptr_t old) { |
| 115 if (window == window_ && key == ui::kChildAXTreeID) { | 117 if (window == window_ && key == ui::kChildAXTreeID) { |
| 116 AXAuraObjCache::GetInstance()->FireEvent(this, | 118 AXAuraObjCache::GetInstance()->FireEvent(this, |
| 117 ui::AX_EVENT_CHILDREN_CHANGED); | 119 ui::AX_EVENT_CHILDREN_CHANGED); |
| 118 } | 120 } |
| 119 } | 121 } |
| 120 | 122 |
| 121 } // namespace views | 123 } // namespace views |
| OLD | NEW |