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) { | |
160 // TODO(yhanada): This hack will be removed when HandleAccessibleAction will | |
161 // be used for handling click events. | |
162 if (contents_view_) | |
yoshiki
2017/03/27 06:04:51
nit: please add brackets for multi-line if-block.
yhanada
2017/03/27 06:26:42
Done. Thanks!
| |
163 if (contents_view_->OnMousePressed(event)) | |
164 return true; | |
165 return MessageView::OnMousePressed(event); | |
166 } | |
167 | |
159 } // namespace message_center | 168 } // namespace message_center |
OLD | NEW |