Chromium Code Reviews| 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 "chrome/browser/notifications/message_center_notification_manager.h" | 5 #include "chrome/browser/notifications/message_center_notification_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "chrome/browser/notifications/notification.h" | 9 #include "chrome/browser/notifications/notification.h" |
| 10 #include "chrome/browser/prefs/pref_service.h" | 10 #include "chrome/browser/prefs/pref_service.h" |
| 11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
| 12 #include "ui/message_center/message_center.h" | |
| 12 | 13 |
| 13 MessageCenterNotificationManager::MessageCenterNotificationManager() { | 14 MessageCenterNotificationManager::MessageCenterNotificationManager() { |
| 15 message_center_ = message_center::MessageCenter::GetInstance(); | |
|
stevenjb
2012/12/27 19:49:34
We don't need to seem to need this yet - maybe wai
dewittj
2012/12/27 23:38:50
Done.
Good idea.
| |
| 14 } | 16 } |
| 15 | 17 |
| 16 MessageCenterNotificationManager::~MessageCenterNotificationManager() { | 18 MessageCenterNotificationManager::~MessageCenterNotificationManager() { |
| 17 } | 19 } |
| 18 | 20 |
| 19 bool MessageCenterNotificationManager::CancelById(const std::string& id) { | 21 bool MessageCenterNotificationManager::CancelById(const std::string& id) { |
| 20 // See if this ID hasn't been shown yet. | 22 // See if this ID hasn't been shown yet. |
| 21 if (NotificationUIManagerImpl::CancelById(id)) | 23 if (NotificationUIManagerImpl::CancelById(id)) |
| 22 return true; | 24 return true; |
| 23 | 25 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 } | 58 } |
| 57 | 59 |
| 58 bool MessageCenterNotificationManager::UpdateNotification( | 60 bool MessageCenterNotificationManager::UpdateNotification( |
| 59 const Notification& notification) { | 61 const Notification& notification) { |
| 60 const string16& replace_id = notification.replace_id(); | 62 const string16& replace_id = notification.replace_id(); |
| 61 DCHECK(!replace_id.empty()); | 63 DCHECK(!replace_id.empty()); |
| 62 | 64 |
| 63 NOTIMPLEMENTED(); | 65 NOTIMPLEMENTED(); |
| 64 return false; | 66 return false; |
| 65 } | 67 } |
| OLD | NEW |