| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
 | 
					
						
							| 
									
										
										
										
											2013-12-18 23:20:00 -06:00
										 |  |  | // Copyright (c) 2013 Patrick Reynolds <piki@github.com>. All rights reserved.
 | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | // Use of this source code is governed by a BSD-style license that can be
 | 
					
						
							|  |  |  | // found in the LICENSE-CHROMIUM file.
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 13:46:59 -07:00
										 |  |  | #include "shell/browser/notifications/linux/notification_presenter_linux.h"
 | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 13:46:59 -07:00
										 |  |  | #include "shell/browser/notifications/linux/libnotify_notification.h"
 | 
					
						
							| 
									
										
										
										
											2015-04-20 13:22:18 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | namespace electron { | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-07-27 10:27:41 +00:00
										 |  |  | // static
 | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | NotificationPresenter* NotificationPresenter::Create() { | 
					
						
							| 
									
										
										
										
											2015-12-25 11:52:19 +08:00
										 |  |  |   if (!LibnotifyNotification::Initialize()) | 
					
						
							| 
									
										
										
										
											2015-12-24 10:46:08 +08:00
										 |  |  |     return nullptr; | 
					
						
							| 
									
										
										
										
											2015-12-25 11:52:19 +08:00
										 |  |  |   return new NotificationPresenterLinux; | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-16 18:12:00 -04:00
										 |  |  | NotificationPresenterLinux::NotificationPresenterLinux() = default; | 
					
						
							| 
									
										
										
										
											2013-12-18 23:05:19 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-16 18:12:00 -04:00
										 |  |  | NotificationPresenterLinux::~NotificationPresenterLinux() = default; | 
					
						
							| 
									
										
										
										
											2013-12-18 15:02:49 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-03 10:38:21 +02:00
										 |  |  | Notification* NotificationPresenterLinux::CreateNotificationObject( | 
					
						
							|  |  |  |     NotificationDelegate* delegate) { | 
					
						
							| 
									
										
										
										
											2017-01-10 16:34:41 +01:00
										 |  |  |   return new LibnotifyNotification(delegate, this); | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-19 14:23:04 -07:00
										 |  |  | }  // namespace electron
 |