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

Side by Side Diff: ui/arc/notification/arc_notification_content_view.cc

Issue 2918483002: Add an accessibility description for notification (Closed)
Patch Set: Fixed build failure 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/arc/notification/arc_notification_content_view.h" 5 #include "ui/arc/notification/arc_notification_content_view.h"
6 6
7 #include "ash/wm/window_util.h" 7 #include "ash/wm/window_util.h"
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "components/exo/notification_surface.h" 10 #include "components/exo/notification_surface.h"
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 const ui::AXActionData& action_data) { 630 const ui::AXActionData& action_data) {
631 if (item_ && action_data.action == ui::AX_ACTION_DO_DEFAULT) { 631 if (item_ && action_data.action == ui::AX_ACTION_DO_DEFAULT) {
632 item_->ToggleExpansion(); 632 item_->ToggleExpansion();
633 return true; 633 return true;
634 } 634 }
635 return false; 635 return false;
636 } 636 }
637 637
638 void ArcNotificationContentView::GetAccessibleNodeData( 638 void ArcNotificationContentView::GetAccessibleNodeData(
639 ui::AXNodeData* node_data) { 639 ui::AXNodeData* node_data) {
640 node_data->role = ui::AX_ROLE_BUTTON; 640 node_data->role = ui::AX_ROLE_NOTIFICATION;
David Tseng 2017/06/02 17:56:11 I would keep this.
yoshiki 2017/06/05 05:06:03 Thank you for comment. if you don't think this cha
David Tseng 2017/06/05 16:27:17 No problem. It's is needed...see the other comment
David Tseng 2017/06/02 17:56:11 And add this as role description string attribute.
David Tseng 2017/06/05 16:27:17 A role is a programmatic identifier (string) that
641 node_data->SetName(accessible_name_); 641 node_data->SetName(accessible_name_);
642 } 642 }
643 643
644 void ArcNotificationContentView::ButtonPressed(views::Button* sender, 644 void ArcNotificationContentView::ButtonPressed(views::Button* sender,
645 const ui::Event& event) { 645 const ui::Event& event) {
646 if (item_ && !item_->GetPinned() && sender == close_button_.get()) { 646 if (item_ && !item_->GetPinned() && sender == close_button_.get()) {
647 CHECK_EQ(ArcNotificationView::kViewClassName, parent()->GetClassName()); 647 CHECK_EQ(ArcNotificationView::kViewClassName, parent()->GetClassName());
648 static_cast<ArcNotificationView*>(parent())->OnCloseButtonPressed(); 648 static_cast<ArcNotificationView*>(parent())->OnCloseButtonPressed();
649 } 649 }
650 if (item_ && settings_button_ && sender == settings_button_) { 650 if (item_ && settings_button_ && sender == settings_button_) {
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 726 }
727 if (close_button_) { 727 if (close_button_) {
728 close_button_->set_background( 728 close_button_->set_background(
729 views::Background::CreateSolidBackground(current_color)); 729 views::Background::CreateSolidBackground(current_color));
730 close_button_->SchedulePaint(); 730 close_button_->SchedulePaint();
731 } 731 }
732 } 732 }
733 } 733 }
734 734
735 } // namespace arc 735 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698