| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/notifications/page_notification_delegate.h" | 5 #include "content/browser/notifications/page_notification_delegate.h" |
| 6 | 6 |
| 7 #include "content/browser/notifications/notification_message_filter.h" | 7 #include "content/browser/notifications/notification_message_filter.h" |
| 8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 9 #include "content/common/platform_notification_messages.h" | 9 #include "content/common/platform_notification_messages.h" |
| 10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 sender->Send(new PlatformNotificationMsg_DidShow(notification_id_)); | 26 sender->Send(new PlatformNotificationMsg_DidShow(notification_id_)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void PageNotificationDelegate::NotificationClosed() { | 29 void PageNotificationDelegate::NotificationClosed() { |
| 30 RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_); | 30 RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_); |
| 31 if (!sender) | 31 if (!sender) |
| 32 return; | 32 return; |
| 33 | 33 |
| 34 sender->Send(new PlatformNotificationMsg_DidClose(notification_id_)); | 34 sender->Send(new PlatformNotificationMsg_DidClose(notification_id_)); |
| 35 /** |
| 35 static_cast<RenderProcessHostImpl*>(sender) | 36 static_cast<RenderProcessHostImpl*>(sender) |
| 36 ->notification_message_filter() | 37 ->notification_message_filter() |
| 37 ->DidCloseNotification(notification_id_); | 38 ->DidCloseNotification(notification_id_); |
| 39 **/ |
| 38 } | 40 } |
| 39 | 41 |
| 40 void PageNotificationDelegate::NotificationClick() { | 42 void PageNotificationDelegate::NotificationClick() { |
| 41 RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_); | 43 RenderProcessHost* sender = RenderProcessHost::FromID(render_process_id_); |
| 42 if (!sender) | 44 if (!sender) |
| 43 return; | 45 return; |
| 44 | 46 |
| 45 sender->Send(new PlatformNotificationMsg_DidClick(notification_id_)); | 47 sender->Send(new PlatformNotificationMsg_DidClick(notification_id_)); |
| 46 } | 48 } |
| 47 | 49 |
| 48 } // namespace content | 50 } // namespace content |
| OLD | NEW |