| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/native_notification_display_service.h" | 5 #include "chrome/browser/notifications/native_notification_display_service.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/notifications/non_persistent_notification_handler.h" | 9 #include "chrome/browser/notifications/non_persistent_notification_handler.h" |
| 10 #include "chrome/browser/notifications/notification.h" | 10 #include "chrome/browser/notifications/notification.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 notification_handlers_.erase(notification_type); | 108 notification_handlers_.erase(notification_type); |
| 109 } | 109 } |
| 110 | 110 |
| 111 NotificationHandler* NativeNotificationDisplayService::GetNotificationHandler( | 111 NotificationHandler* NativeNotificationDisplayService::GetNotificationHandler( |
| 112 NotificationCommon::Type notification_type) { | 112 NotificationCommon::Type notification_type) { |
| 113 DCHECK(notification_handlers_.find(notification_type) != | 113 DCHECK(notification_handlers_.find(notification_type) != |
| 114 notification_handlers_.end()) | 114 notification_handlers_.end()) |
| 115 << notification_type << " is not registered."; | 115 << notification_type << " is not registered."; |
| 116 return notification_handlers_[notification_type].get(); | 116 return notification_handlers_[notification_type].get(); |
| 117 } | 117 } |
| 118 | |
| 119 bool NativeNotificationDisplayService::SupportsNotificationCenter() const { | |
| 120 return notification_bridge_->SupportsNotificationCenter(); | |
| 121 } | |
| OLD | NEW |