| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "content/browser/frame_host/render_frame_host_impl.h" | 5 #include "content/browser/frame_host/render_frame_host_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/metrics/user_metrics_action.h" | 10 #include "base/metrics/user_metrics_action.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 84 | 84 |
| 85 virtual void NotificationError() OVERRIDE { | 85 virtual void NotificationError() OVERRIDE { |
| 86 RenderFrameHost* rfh = | 86 RenderFrameHost* rfh = |
| 87 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | 87 RenderFrameHost::FromID(render_process_id_, render_frame_id_); |
| 88 if (!rfh) | 88 if (!rfh) |
| 89 return; | 89 return; |
| 90 | 90 |
| 91 rfh->Send(new DesktopNotificationMsg_PostError( | 91 rfh->Send(new DesktopNotificationMsg_PostError( |
| 92 rfh->GetRoutingID(), notification_id_)); | 92 rfh->GetRoutingID(), notification_id_)); |
| 93 delete this; | |
| 94 } | 93 } |
| 95 | 94 |
| 96 virtual void NotificationClosed(bool by_user) OVERRIDE { | 95 virtual void NotificationClosed(bool by_user) OVERRIDE { |
| 97 RenderFrameHost* rfh = | 96 RenderFrameHost* rfh = |
| 98 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | 97 RenderFrameHost::FromID(render_process_id_, render_frame_id_); |
| 99 if (!rfh) | 98 if (!rfh) |
| 100 return; | 99 return; |
| 101 | 100 |
| 102 rfh->Send(new DesktopNotificationMsg_PostClose( | 101 rfh->Send(new DesktopNotificationMsg_PostClose( |
| 103 rfh->GetRoutingID(), notification_id_, by_user)); | 102 rfh->GetRoutingID(), notification_id_, by_user)); |
| 104 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed( | 103 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed( |
| 105 notification_id_); | 104 notification_id_); |
| 106 delete this; | |
| 107 } | 105 } |
| 108 | 106 |
| 109 virtual void NotificationClick() OVERRIDE { | 107 virtual void NotificationClick() OVERRIDE { |
| 110 RenderFrameHost* rfh = | 108 RenderFrameHost* rfh = |
| 111 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | 109 RenderFrameHost::FromID(render_process_id_, render_frame_id_); |
| 112 if (!rfh) | 110 if (!rfh) |
| 113 return; | 111 return; |
| 114 | 112 |
| 115 rfh->Send(new DesktopNotificationMsg_PostClick( | 113 rfh->Send(new DesktopNotificationMsg_PostClick( |
| 116 rfh->GetRoutingID(), notification_id_)); | 114 rfh->GetRoutingID(), notification_id_)); |
| (...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1191 FROM_HERE, | 1189 FROM_HERE, |
| 1192 base::Bind( | 1190 base::Bind( |
| 1193 &TransitionRequestManager::SetHasPendingTransitionRequest, | 1191 &TransitionRequestManager::SetHasPendingTransitionRequest, |
| 1194 base::Unretained(TransitionRequestManager::GetInstance()), | 1192 base::Unretained(TransitionRequestManager::GetInstance()), |
| 1195 GetProcess()->GetID(), | 1193 GetProcess()->GetID(), |
| 1196 routing_id_, | 1194 routing_id_, |
| 1197 has_pending_request)); | 1195 has_pending_request)); |
| 1198 } | 1196 } |
| 1199 | 1197 |
| 1200 } // namespace content | 1198 } // namespace content |
| OLD | NEW |