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..3e6a9818f1ce6da4bda8c4c0001aa38e7c1fcece 100644 |
--- a/ui/arc/notification/arc_custom_notification_view.cc |
+++ b/ui/arc/notification/arc_custom_notification_view.cc |
@@ -547,6 +547,22 @@ 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() != |
+ message_center::NotificationExpandState::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()) { |