OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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/accessibility/ax_tree.h" | 5 #include "ui/accessibility/ax_tree.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 auto intlist_callback = [this, node]( | 459 auto intlist_callback = [this, node]( |
460 AXIntListAttribute attr, | 460 AXIntListAttribute attr, |
461 const std::vector<int32_t>& old_intlist, | 461 const std::vector<int32_t>& old_intlist, |
462 const std::vector<int32_t>& new_intlist) { | 462 const std::vector<int32_t>& new_intlist) { |
463 delegate_->OnIntListAttributeChanged(this, node, attr, old_intlist, | 463 delegate_->OnIntListAttributeChanged(this, node, attr, old_intlist, |
464 new_intlist); | 464 new_intlist); |
465 }; | 465 }; |
466 CallIfAttributeValuesChanged(old_data.intlist_attributes, | 466 CallIfAttributeValuesChanged(old_data.intlist_attributes, |
467 new_data.intlist_attributes, | 467 new_data.intlist_attributes, |
468 std::vector<int32_t>(), intlist_callback); | 468 std::vector<int32_t>(), intlist_callback); |
| 469 |
| 470 auto stringlist_callback = |
| 471 [this, node](AXStringListAttribute attr, |
| 472 const std::vector<std::string>& old_stringlist, |
| 473 const std::vector<std::string>& new_stringlist) { |
| 474 delegate_->OnStringListAttributeChanged(this, node, attr, |
| 475 old_stringlist, new_stringlist); |
| 476 }; |
| 477 CallIfAttributeValuesChanged(old_data.stringlist_attributes, |
| 478 new_data.stringlist_attributes, |
| 479 std::vector<std::string>(), stringlist_callback); |
469 } | 480 } |
470 | 481 |
471 void AXTree::DestroySubtree(AXNode* node, | 482 void AXTree::DestroySubtree(AXNode* node, |
472 AXTreeUpdateState* update_state) { | 483 AXTreeUpdateState* update_state) { |
473 DCHECK(update_state); | 484 DCHECK(update_state); |
474 if (delegate_) { | 485 if (delegate_) { |
475 if (!update_state->HasChangedNode(node)) | 486 if (!update_state->HasChangedNode(node)) |
476 delegate_->OnSubtreeWillBeDeleted(this, node); | 487 delegate_->OnSubtreeWillBeDeleted(this, node); |
477 else | 488 else |
478 delegate_->OnSubtreeWillBeReparented(this, node); | 489 delegate_->OnSubtreeWillBeReparented(this, node); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 update_state->pending_nodes.insert(child); | 563 update_state->pending_nodes.insert(child); |
553 update_state->new_nodes.insert(child); | 564 update_state->new_nodes.insert(child); |
554 } | 565 } |
555 new_children->push_back(child); | 566 new_children->push_back(child); |
556 } | 567 } |
557 | 568 |
558 return success; | 569 return success; |
559 } | 570 } |
560 | 571 |
561 } // namespace ui | 572 } // namespace ui |
OLD | NEW |