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

Side by Side Diff: ui/message_center/message_center_bubble.cc

Issue 12277024: Notificaitons refactor step 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed latest nits Created 7 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 | Annotate | Revision Log
OLDNEW
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
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(&notifications); 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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698