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

Side by Side Diff: ash/system/user/user_card_view.cc

Issue 2860883003: A11y: Add/refactor methods for manipulating bitfields on AXNodeData. (Closed)
Patch Set: Revert comment. Created 3 years, 7 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
OLDNEW
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 "ash/system/user/user_card_view.h" 5 #include "ash/system/user/user_card_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 std::vector<base::string16> labels; 317 std::vector<base::string16> labels;
318 318
319 // Construct the name by concatenating descendants' names. 319 // Construct the name by concatenating descendants' names.
320 std::list<views::View*> descendants; 320 std::list<views::View*> descendants;
321 descendants.push_back(this); 321 descendants.push_back(this);
322 while (!descendants.empty()) { 322 while (!descendants.empty()) {
323 auto* view = descendants.front(); 323 auto* view = descendants.front();
324 descendants.pop_front(); 324 descendants.pop_front();
325 if (view != this) { 325 if (view != this) {
326 ui::AXNodeData descendant_data; 326 ui::AXNodeData descendant_data;
327 descendant_data.ClearBitfields();
327 view->GetAccessibleNodeData(&descendant_data); 328 view->GetAccessibleNodeData(&descendant_data);
328 base::string16 label = 329 base::string16 label =
329 descendant_data.GetString16Attribute(ui::AX_ATTR_NAME); 330 descendant_data.GetString16Attribute(ui::AX_ATTR_NAME);
330 // If we find a non-empty name, use that and don't descend further into 331 // If we find a non-empty name, use that and don't descend further into
331 // the tree. 332 // the tree.
332 if (!label.empty()) { 333 if (!label.empty()) {
333 labels.push_back(label); 334 labels.push_back(label);
334 continue; 335 continue;
335 } 336 }
336 } 337 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 media_capture_container_ = new views::View(); 442 media_capture_container_ = new views::View();
442 media_capture_container_->SetLayoutManager(new views::FillLayout()); 443 media_capture_container_->SetLayoutManager(new views::FillLayout());
443 media_capture_container_->AddChildView(media_capture_icon_); 444 media_capture_container_->AddChildView(media_capture_icon_);
444 AddChildView(media_capture_container_); 445 AddChildView(media_capture_container_);
445 446
446 Shell::Get()->media_controller()->RequestCaptureState(); 447 Shell::Get()->media_controller()->RequestCaptureState();
447 } 448 }
448 449
449 } // namespace tray 450 } // namespace tray
450 } // namespace ash 451 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698