| 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/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/containers/hash_tables.h" | 9 #include "base/containers/hash_tables.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void NotificationDisplayed() override { | 94 void NotificationDisplayed() override { |
| 95 RenderFrameHost* rfh = | 95 RenderFrameHost* rfh = |
| 96 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | 96 RenderFrameHost::FromID(render_process_id_, render_frame_id_); |
| 97 if (!rfh) | 97 if (!rfh) |
| 98 return; | 98 return; |
| 99 | 99 |
| 100 rfh->Send(new DesktopNotificationMsg_PostDisplay( | 100 rfh->Send(new DesktopNotificationMsg_PostDisplay( |
| 101 rfh->GetRoutingID(), notification_id_)); | 101 rfh->GetRoutingID(), notification_id_)); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void NotificationError() override { | |
| 105 RenderFrameHost* rfh = | |
| 106 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | |
| 107 if (!rfh) | |
| 108 return; | |
| 109 | |
| 110 rfh->Send(new DesktopNotificationMsg_PostError( | |
| 111 rfh->GetRoutingID(), notification_id_)); | |
| 112 } | |
| 113 | |
| 114 void NotificationClosed(bool by_user) override { | 104 void NotificationClosed(bool by_user) override { |
| 115 RenderFrameHost* rfh = | 105 RenderFrameHost* rfh = |
| 116 RenderFrameHost::FromID(render_process_id_, render_frame_id_); | 106 RenderFrameHost::FromID(render_process_id_, render_frame_id_); |
| 117 if (!rfh) | 107 if (!rfh) |
| 118 return; | 108 return; |
| 119 | 109 |
| 120 rfh->Send(new DesktopNotificationMsg_PostClose( | 110 rfh->Send(new DesktopNotificationMsg_PostClose( |
| 121 rfh->GetRoutingID(), notification_id_, by_user)); | 111 rfh->GetRoutingID(), notification_id_, by_user)); |
| 122 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed( | 112 static_cast<RenderFrameHostImpl*>(rfh)->NotificationClosed( |
| 123 notification_id_); | 113 notification_id_); |
| (...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1658 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1648 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
| 1659 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1649 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
| 1660 GetContentClient()->browser()->RegisterPermissionUsage( | 1650 GetContentClient()->browser()->RegisterPermissionUsage( |
| 1661 PERMISSION_GEOLOCATION, | 1651 PERMISSION_GEOLOCATION, |
| 1662 delegate_->GetAsWebContents(), | 1652 delegate_->GetAsWebContents(), |
| 1663 GetLastCommittedURL().GetOrigin(), | 1653 GetLastCommittedURL().GetOrigin(), |
| 1664 top_frame->GetLastCommittedURL().GetOrigin()); | 1654 top_frame->GetLastCommittedURL().GetOrigin()); |
| 1665 } | 1655 } |
| 1666 | 1656 |
| 1667 } // namespace content | 1657 } // namespace content |
| OLD | NEW |