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/message_center_bubble.h" | 5 #include "ui/message_center/message_center_bubble.h" |
6 | 6 |
7 #include "grit/ui_strings.h" | 7 #include "grit/ui_strings.h" |
8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/base/resource/resource_bundle.h" | 10 #include "ui/base/resource/resource_bundle.h" |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 contents_view_->FocusContents(); | 501 contents_view_->FocusContents(); |
502 } | 502 } |
503 | 503 |
504 void MessageCenterBubble::OnBubbleViewDestroyed() { | 504 void MessageCenterBubble::OnBubbleViewDestroyed() { |
505 contents_view_ = NULL; | 505 contents_view_ = NULL; |
506 } | 506 } |
507 | 507 |
508 void MessageCenterBubble::UpdateBubbleView() { | 508 void MessageCenterBubble::UpdateBubbleView() { |
509 if (!bubble_view()) | 509 if (!bubble_view()) |
510 return; // Could get called after view is closed | 510 return; // Could get called after view is closed |
511 NotificationList::Notifications notifications; | 511 const NotificationList::Notifications& notifications = |
512 list_delegate()->GetNotificationList()->GetNotifications(¬ifications); | 512 list_delegate()->GetNotificationList()->GetNotifications(); |
513 contents_view_->Update(notifications); | 513 contents_view_->Update(notifications); |
514 bubble_view()->Show(); | 514 bubble_view()->Show(); |
515 bubble_view()->UpdateBubble(); | 515 bubble_view()->UpdateBubble(); |
516 } | 516 } |
517 | 517 |
518 void MessageCenterBubble::OnMouseEnteredView() { | 518 void MessageCenterBubble::OnMouseEnteredView() { |
519 } | 519 } |
520 | 520 |
521 void MessageCenterBubble::OnMouseExitedView() { | 521 void MessageCenterBubble::OnMouseExitedView() { |
522 } | 522 } |
523 | 523 |
524 size_t MessageCenterBubble::NumMessageViewsForTest() const { | 524 size_t MessageCenterBubble::NumMessageViewsForTest() const { |
525 return contents_view_->NumMessageViews(); | 525 return contents_view_->NumMessageViews(); |
526 } | 526 } |
527 | 527 |
528 } // namespace message_center | 528 } // namespace message_center |
OLD | NEW |