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

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

Issue 2685283002: Add UpdateNotificationSize to MessageCenterController. (Closed)
Patch Set: address comments Created 3 years, 10 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
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"
11 #include "ui/base/ime/text_input_type.h" 11 #include "ui/base/ime/text_input_type.h"
12 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 #include "ui/message_center/message_center_style.h" 13 #include "ui/message_center/message_center_style.h"
14 #include "ui/message_center/views/message_center_controller.h"
14 #include "ui/views/background.h" 15 #include "ui/views/background.h"
15 #include "ui/views/controls/button/image_button.h" 16 #include "ui/views/controls/button/image_button.h"
16 #include "ui/views/controls/image_view.h" 17 #include "ui/views/controls/image_view.h"
17 #include "ui/views/painter.h" 18 #include "ui/views/painter.h"
18 19
19 namespace message_center { 20 namespace message_center {
20 21
21 CustomNotificationView::CustomNotificationView( 22 CustomNotificationView::CustomNotificationView(
22 MessageCenterController* controller, 23 MessageCenterController* controller,
23 const Notification& notification) 24 const Notification& notification)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 // back space and return keys. So that these key events are sent to the 139 // back space and return keys. So that these key events are sent to the
139 // arc container correctly without being handled by the message center. 140 // arc container correctly without being handled by the message center.
140 return false; 141 return false;
141 } 142 }
142 } 143 }
143 } 144 }
144 145
145 return MessageView::OnKeyPressed(event); 146 return MessageView::OnKeyPressed(event);
146 } 147 }
147 148
149 void CustomNotificationView::ChildPreferredSizeChanged(View* child) {
150 // Notify MessageCenterController when the custom content changes size,
151 // as it may need to relayout.
152 controller()->UpdateNotificationSize(notification_id());
153 }
154
148 } // namespace message_center 155 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/custom_notification_view.h ('k') | ui/message_center/views/custom_notification_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698