| OLD | NEW |
| 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/message_center/views/custom_notification_view.h" | 5 #include "ui/message_center/views/custom_notification_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ui/base/ime/input_method.h" | 9 #include "ui/base/ime/input_method.h" |
| 10 #include "ui/base/ime/text_input_client.h" | 10 #include "ui/base/ime/text_input_client.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 return MessageView::OnKeyPressed(event); | 149 return MessageView::OnKeyPressed(event); |
| 150 } | 150 } |
| 151 | 151 |
| 152 void CustomNotificationView::ChildPreferredSizeChanged(View* child) { | 152 void CustomNotificationView::ChildPreferredSizeChanged(View* child) { |
| 153 // Notify MessageCenterController when the custom content changes size, | 153 // Notify MessageCenterController when the custom content changes size, |
| 154 // as it may need to relayout. | 154 // as it may need to relayout. |
| 155 if (controller()) | 155 if (controller()) |
| 156 controller()->UpdateNotificationSize(notification_id()); | 156 controller()->UpdateNotificationSize(notification_id()); |
| 157 } | 157 } |
| 158 | 158 |
| 159 bool CustomNotificationView::OnMousePressed(const ui::MouseEvent& event) { | 159 bool CustomNotificationView::HandleAccessibleAction( |
| 160 // TODO(yhanada): This hack will be removed when HandleAccessibleAction will | 160 const ui::AXActionData& action) { |
| 161 // be used for handling click events. | 161 if (contents_view_) |
| 162 if (contents_view_ && contents_view_->OnMousePressed(event)) | 162 return contents_view_->HandleAccessibleAction(action); |
| 163 return true; | 163 return false; |
| 164 return MessageView::OnMousePressed(event); | |
| 165 } | 164 } |
| 166 | 165 |
| 167 } // namespace message_center | 166 } // namespace message_center |
| OLD | NEW |