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

Side by Side Diff: ash/system/user/button_from_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 <vector> 5 #include <vector>
6 6
7 #include "ash/system/user/button_from_view.h" 7 #include "ash/system/user/button_from_view.h"
8 8
9 #include "ash/ash_constants.h" 9 #include "ash/ash_constants.h"
10 #include "ash/system/tray/tray_constants.h" 10 #include "ash/system/tray/tray_constants.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Removing focus frame. 72 // Removing focus frame.
73 SchedulePaint(); 73 SchedulePaint();
74 } 74 }
75 75
76 void ButtonFromView::GetAccessibleNodeData(ui::AXNodeData* node_data) { 76 void ButtonFromView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
77 views::CustomButton::GetAccessibleNodeData(node_data); 77 views::CustomButton::GetAccessibleNodeData(node_data);
78 // If no label has been explicitly set via CustomButton::SetAccessibleName(), 78 // If no label has been explicitly set via CustomButton::SetAccessibleName(),
79 // use the content's label. 79 // use the content's label.
80 if (node_data->GetStringAttribute(ui::AX_ATTR_NAME).empty()) { 80 if (node_data->GetStringAttribute(ui::AX_ATTR_NAME).empty()) {
81 ui::AXNodeData content_data; 81 ui::AXNodeData content_data;
82 content_data.ClearBitfields();
82 content_->GetAccessibleNodeData(&content_data); 83 content_->GetAccessibleNodeData(&content_data);
83 node_data->SetName(content_data.GetStringAttribute(ui::AX_ATTR_NAME)); 84 node_data->SetName(content_data.GetStringAttribute(ui::AX_ATTR_NAME));
84 } 85 }
85 } 86 }
86 87
87 void ButtonFromView::Layout() { 88 void ButtonFromView::Layout() {
88 CustomButton::Layout(); 89 CustomButton::Layout();
89 if (ink_drop_container_) 90 if (ink_drop_container_)
90 ink_drop_container_->SetBoundsRect(GetLocalBounds()); 91 ink_drop_container_->SetBoundsRect(GetLocalBounds());
91 } 92 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ButtonFromView::CreateInkDropHighlight() const { 125 ButtonFromView::CreateInkDropHighlight() const {
125 return TrayPopupUtils::CreateInkDropHighlight(ink_drop_style_, this); 126 return TrayPopupUtils::CreateInkDropHighlight(ink_drop_style_, this);
126 } 127 }
127 128
128 std::unique_ptr<views::InkDropMask> ButtonFromView::CreateInkDropMask() const { 129 std::unique_ptr<views::InkDropMask> ButtonFromView::CreateInkDropMask() const {
129 return TrayPopupUtils::CreateInkDropMask(ink_drop_style_, this); 130 return TrayPopupUtils::CreateInkDropMask(ink_drop_style_, this);
130 } 131 }
131 132
132 } // namespace tray 133 } // namespace tray
133 } // namespace ash 134 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698