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 908e49eff5660a854f1c04ccbb43df91d67db0c6..d640556c32c2f29ddc19f24d7f48010a9cb6f930 100644 |
--- a/ui/arc/notification/arc_custom_notification_view.cc |
+++ b/ui/arc/notification/arc_custom_notification_view.cc |
@@ -547,6 +547,21 @@ 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. |
+ if (event.IsOnlyLeftMouseButton() && |
+ item_->expand_state() != mojom::ArcNotificationExpandState::FIXED_SIZE && |
+ event.target() != surface_->window()) { |
+ item_->ToggleExpansion(); |
+ return true; |
+ } |
+ return false; |
+} |
+ |
void ArcCustomNotificationView::ButtonPressed(views::Button* sender, |
const ui::Event& event) { |
if (item_ && !item_->pinned() && sender == close_button_.get()) { |