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.h" | 5 #include "content/browser/accessibility/browser_accessibility_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/accessibility/browser_accessibility.h" | 8 #include "content/browser/accessibility/browser_accessibility.h" |
9 #include "content/common/accessibility_messages.h" | 9 #include "content/common/accessibility_messages.h" |
10 | 10 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 return; | 168 return; |
169 } | 169 } |
170 | 170 |
171 // Set focus to the root if it's not anywhere else. | 171 // Set focus to the root if it's not anywhere else. |
172 if (!focus_) { | 172 if (!focus_) { |
173 SetFocus(tree_->GetRoot(), false); | 173 SetFocus(tree_->GetRoot(), false); |
174 should_send_initial_focus = true; | 174 should_send_initial_focus = true; |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 OnUpdateFinished(); | |
David Tseng
2014/05/09 03:09:47
nit: Maybe OnTreeUpdateFinished?
dmazzoni
2014/05/09 06:10:30
Done.
| |
179 | |
178 if (should_send_initial_focus && | 180 if (should_send_initial_focus && |
179 (!delegate_ || delegate_->AccessibilityViewHasFocus())) { | 181 (!delegate_ || delegate_->AccessibilityViewHasFocus())) { |
180 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetFromAXNode(focus_)); | 182 NotifyAccessibilityEvent(ui::AX_EVENT_FOCUS, GetFromAXNode(focus_)); |
181 } | 183 } |
182 | 184 |
183 // Now iterate over the events again and fire the events. | 185 // Now iterate over the events again and fire the events. |
184 for (uint32 index = 0; index < params.size(); index++) { | 186 for (uint32 index = 0; index < params.size(); index++) { |
185 const AccessibilityHostMsg_EventParams& param = params[index]; | 187 const AccessibilityHostMsg_EventParams& param = params[index]; |
186 | 188 |
187 // Find the node corresponding to the id that's the target of the | 189 // Find the node corresponding to the id that's the target of the |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 | 340 |
339 void BrowserAccessibilityManager::OnNodeCreationFinished(ui::AXNode* node) { | 341 void BrowserAccessibilityManager::OnNodeCreationFinished(ui::AXNode* node) { |
340 GetFromAXNode(node)->OnUpdateFinished(); | 342 GetFromAXNode(node)->OnUpdateFinished(); |
341 } | 343 } |
342 | 344 |
343 void BrowserAccessibilityManager::OnNodeChangeFinished(ui::AXNode* node) { | 345 void BrowserAccessibilityManager::OnNodeChangeFinished(ui::AXNode* node) { |
344 GetFromAXNode(node)->OnUpdateFinished(); | 346 GetFromAXNode(node)->OnUpdateFinished(); |
345 } | 347 } |
346 | 348 |
347 } // namespace content | 349 } // namespace content |
OLD | NEW |