OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/accessibility/browser_accessibility_manager_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager_win.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/win/scoped_comptr.h" | 10 #include "base/win/scoped_comptr.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 | 169 |
170 // Set this flag so that we'll keep trying to fire these focus events | 170 // Set this flag so that we'll keep trying to fire these focus events |
171 // if they're not successful this time. | 171 // if they're not successful this time. |
172 focus_event_on_root_needed_ = true; | 172 focus_event_on_root_needed_ = true; |
173 | 173 |
174 if (!delegate_ || !delegate_->AccessibilityViewHasFocus()) | 174 if (!delegate_ || !delegate_->AccessibilityViewHasFocus()) |
175 return; | 175 return; |
176 | 176 |
177 // Try to fire a focus event on the root first and then the focused node. | 177 // Try to fire a focus event on the root first and then the focused node. |
178 // This will clear focus_event_on_root_needed_ if successful. | 178 // This will clear focus_event_on_root_needed_ if successful. |
179 if (focus_ != tree_->GetRoot()) | 179 if (focus_ != tree_->root()) |
180 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetRoot()); | 180 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetRoot()); |
181 BrowserAccessibilityManager::OnWindowFocused(); | 181 BrowserAccessibilityManager::OnWindowFocused(); |
182 } | 182 } |
183 | 183 |
184 void BrowserAccessibilityManagerWin::UserIsReloading() { | 184 void BrowserAccessibilityManagerWin::UserIsReloading() { |
185 MaybeCallNotifyWinEvent(IA2_EVENT_DOCUMENT_RELOAD, GetRoot()); | 185 MaybeCallNotifyWinEvent(IA2_EVENT_DOCUMENT_RELOAD, GetRoot()); |
186 } | 186 } |
187 | 187 |
188 void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( | 188 void BrowserAccessibilityManagerWin::NotifyAccessibilityEvent( |
189 ui::AXEvent event_type, | 189 ui::AXEvent event_type, |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 child_manager->GetFromUniqueIdWin(unique_id_win); | 383 child_manager->GetFromUniqueIdWin(unique_id_win); |
384 if (result) | 384 if (result) |
385 return result; | 385 return result; |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 return NULL; | 389 return NULL; |
390 } | 390 } |
391 | 391 |
392 } // namespace content | 392 } // namespace content |
OLD | NEW |