Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Side by Side Diff: ui/accessibility/ax_tree.cc

Issue 2873373005: Add custom action support (Closed)
Patch Set: Fix a few files. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« ui/accessibility/ax_enums.idl ('K') | « ui/accessibility/ax_tree.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 auto intlist_callback = [this, node]( 400 auto intlist_callback = [this, node](
401 AXIntListAttribute attr, 401 AXIntListAttribute attr,
402 const std::vector<int32_t>& old_intlist, 402 const std::vector<int32_t>& old_intlist,
403 const std::vector<int32_t>& new_intlist) { 403 const std::vector<int32_t>& new_intlist) {
404 delegate_->OnIntListAttributeChanged(this, node, attr, old_intlist, 404 delegate_->OnIntListAttributeChanged(this, node, attr, old_intlist,
405 new_intlist); 405 new_intlist);
406 }; 406 };
407 CallIfAttributeValuesChanged(old_data.intlist_attributes, 407 CallIfAttributeValuesChanged(old_data.intlist_attributes,
408 new_data.intlist_attributes, 408 new_data.intlist_attributes,
409 std::vector<int32_t>(), intlist_callback); 409 std::vector<int32_t>(), intlist_callback);
410
411 auto stringlist_callback =
412 [this, node](AXStringListAttribute attr,
413 const std::vector<std::string>& old_stringlist,
414 const std::vector<std::string>& new_stringlist) {
415 delegate_->OnStringListAttributeChanged(this, node, attr,
416 old_stringlist, new_stringlist);
417 };
418 CallIfAttributeValuesChanged(old_data.stringlist_attributes,
419 new_data.stringlist_attributes,
420 std::vector<std::string>(), stringlist_callback);
410 } 421 }
411 422
412 void AXTree::DestroySubtree(AXNode* node, 423 void AXTree::DestroySubtree(AXNode* node,
413 AXTreeUpdateState* update_state) { 424 AXTreeUpdateState* update_state) {
414 DCHECK(update_state); 425 DCHECK(update_state);
415 if (delegate_) { 426 if (delegate_) {
416 if (!update_state->HasChangedNode(node)) 427 if (!update_state->HasChangedNode(node))
417 delegate_->OnSubtreeWillBeDeleted(this, node); 428 delegate_->OnSubtreeWillBeDeleted(this, node);
418 else 429 else
419 delegate_->OnSubtreeWillBeReparented(this, node); 430 delegate_->OnSubtreeWillBeReparented(this, node);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 update_state->pending_nodes.insert(child); 504 update_state->pending_nodes.insert(child);
494 update_state->new_nodes.insert(child); 505 update_state->new_nodes.insert(child);
495 } 506 }
496 new_children->push_back(child); 507 new_children->push_back(child);
497 } 508 }
498 509
499 return success; 510 return success;
500 } 511 }
501 512
502 } // namespace ui 513 } // namespace ui
OLDNEW
« ui/accessibility/ax_enums.idl ('K') | « ui/accessibility/ax_tree.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698