OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/message_center_bubble.h" | 5 #include "ui/message_center/views/message_center_bubble.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "grit/ui_strings.h" | 9 #include "grit/ui_strings.h" |
10 #include "third_party/skia/include/core/SkPaint.h" | 10 #include "third_party/skia/include/core/SkPaint.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 0, views::GridLayout::USE_PREF, 0, 0); | 203 0, views::GridLayout::USE_PREF, 0, 0); |
204 layout->StartRow(0, 0); | 204 layout->StartRow(0, 0); |
205 layout->AddView(notification_label_); | 205 layout->AddView(notification_label_); |
206 layout->AddView(settings_button_); | 206 layout->AddView(settings_button_); |
207 layout->AddView(close_all_button); | 207 layout->AddView(close_all_button); |
208 set_close_all_button(close_all_button); | 208 set_close_all_button(close_all_button); |
209 } | 209 } |
210 | 210 |
211 private: | 211 private: |
212 // Overridden from views::View: | 212 // Overridden from views::View: |
213 virtual void ChildVisibilityChanged(views::View* child) { | 213 virtual void ChildVisibilityChanged(views::View* child) OVERRIDE { |
214 InvalidateLayout(); | 214 InvalidateLayout(); |
215 } | 215 } |
216 | 216 |
217 // Overridden from views::ButtonListener: | 217 // Overridden from views::ButtonListener: |
218 virtual void ButtonPressed(views::Button* sender, | 218 virtual void ButtonPressed(views::Button* sender, |
219 const ui::Event& event) OVERRIDE { | 219 const ui::Event& event) OVERRIDE { |
220 if (sender == close_all_button()) | 220 if (sender == close_all_button()) |
221 observer()->OnRemoveAllNotifications(true); // Action by user. | 221 observer()->OnRemoveAllNotifications(true); // Action by user. |
222 else if (sender == settings_button_) | 222 else if (sender == settings_button_) |
223 observer()->OnShowNotificationSettingsDialog( | 223 observer()->OnShowNotificationSettingsDialog( |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
487 } | 487 } |
488 | 488 |
489 void MessageCenterBubble::OnMouseExitedView() { | 489 void MessageCenterBubble::OnMouseExitedView() { |
490 } | 490 } |
491 | 491 |
492 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 492 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
493 return contents_view_->NumMessageViews(); | 493 return contents_view_->NumMessageViews(); |
494 } | 494 } |
495 | 495 |
496 } // namespace message_center | 496 } // namespace message_center |
OLD | NEW |