| Index: ui/arc/notification/arc_custom_notification_view.cc
|
| diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
|
| index 0c8c2ea404313552bb7e8ac750756954ab1e9fad..57c03447773177b2bc22842c18d16fb401c21205 100644
|
| --- a/ui/arc/notification/arc_custom_notification_view.cc
|
| +++ b/ui/arc/notification/arc_custom_notification_view.cc
|
| @@ -9,6 +9,7 @@
|
| #include "base/memory/ptr_util.h"
|
| #include "components/exo/notification_surface.h"
|
| #include "components/exo/surface.h"
|
| +#include "ui/accessibility/ax_action_data.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/compositor/layer_animation_observer.h"
|
| @@ -624,18 +625,9 @@ views::FocusTraversable* ArcCustomNotificationView::GetFocusTraversable() {
|
| return nullptr;
|
| }
|
|
|
| -bool ArcCustomNotificationView::OnMousePressed(const ui::MouseEvent& event) {
|
| - // TODO(yhanada): Remove this hack as soon as possible after letting
|
| - // accessible actions be delivered to this view.
|
| - // All mouse clicks or touches should be sent to corresponding Android view
|
| - // because the surface is on this view, so receiving a mouse pressed event
|
| - // means the event is generated by automation API.
|
| - // We can distinguish events from automation API by checking the target of the
|
| - // event because the target of all events generated by automation API is set
|
| - // to nullptr.
|
| - if (event.IsOnlyLeftMouseButton() && item_ &&
|
| - item_->expand_state() != mojom::ArcNotificationExpandState::FIXED_SIZE &&
|
| - event.target() == nullptr) {
|
| +bool ArcCustomNotificationView::HandleAccessibleAction(
|
| + const ui::AXActionData& action_data) {
|
| + if (item_ && action_data.action == ui::AX_ACTION_DO_DEFAULT) {
|
| item_->ToggleExpansion();
|
| return true;
|
| }
|
|
|