Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: ui/message_center/views/custom_notification_view.cc

Issue 2767253005: Implement TOGGLE_EXPANSION action for the ARC notifications. (Closed)
Patch Set: remove the unused variable Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/message_center/views/custom_notification_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ui/message_center/views/custom_notification_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698