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

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

Issue 264123002: Google Now Message Center Stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_impl.h" 5 #include "ui/message_center/message_center_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 notification_list_->MarkSinglePopupAsDisplayed(id); 812 notification_list_->MarkSinglePopupAsDisplayed(id);
813 notification_cache_.RecountUnread(); 813 notification_cache_.RecountUnread();
814 scoped_refptr<NotificationDelegate> delegate = 814 scoped_refptr<NotificationDelegate> delegate =
815 notification_list_->GetNotificationDelegate(id); 815 notification_list_->GetNotificationDelegate(id);
816 if (delegate.get()) 816 if (delegate.get())
817 delegate->Display(); 817 delegate->Display();
818 FOR_EACH_OBSERVER( 818 FOR_EACH_OBSERVER(
819 MessageCenterObserver, observer_list_, OnNotificationDisplayed(id)); 819 MessageCenterObserver, observer_list_, OnNotificationDisplayed(id));
820 } 820 }
821 821
822 void MessageCenterImpl::PoppedUpNotification(const std::string& id) {
823 DisplayedNotification(id);
824 FOR_EACH_OBSERVER(
825 MessageCenterObserver, observer_list_, OnNotificationPoppedUp(id));
826 }
827
822 void MessageCenterImpl::SetNotifierSettingsProvider( 828 void MessageCenterImpl::SetNotifierSettingsProvider(
823 NotifierSettingsProvider* provider) { 829 NotifierSettingsProvider* provider) {
824 settings_provider_ = provider; 830 settings_provider_ = provider;
825 } 831 }
826 832
827 NotifierSettingsProvider* MessageCenterImpl::GetNotifierSettingsProvider() { 833 NotifierSettingsProvider* MessageCenterImpl::GetNotifierSettingsProvider() {
828 return settings_provider_; 834 return settings_provider_;
829 } 835 }
830 836
831 void MessageCenterImpl::SetQuietMode(bool in_quiet_mode) { 837 void MessageCenterImpl::SetQuietMode(bool in_quiet_mode) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 void MessageCenterImpl::PausePopupTimers() { 872 void MessageCenterImpl::PausePopupTimers() {
867 if (popup_timers_controller_.get()) 873 if (popup_timers_controller_.get())
868 popup_timers_controller_->PauseAll(); 874 popup_timers_controller_->PauseAll();
869 } 875 }
870 876
871 void MessageCenterImpl::DisableTimersForTest() { 877 void MessageCenterImpl::DisableTimersForTest() {
872 popup_timers_controller_.reset(); 878 popup_timers_controller_.reset();
873 } 879 }
874 880
875 } // namespace message_center 881 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698