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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
168 FrameAccessibility::GetInstance()->OnRenderFrameHostDestroyed(this); | 168 FrameAccessibility::GetInstance()->OnRenderFrameHostDestroyed(this); |
169 | 169 |
170 // If this was swapped out, it already decremented the active frame count of | 170 // If this was swapped out, it already decremented the active frame count of |
171 // the SiteInstance it belongs to. | 171 // the SiteInstance it belongs to. |
172 if (IsRFHStateActive(rfh_state_)) | 172 if (IsRFHStateActive(rfh_state_)) |
173 GetSiteInstance()->decrement_active_frame_count(); | 173 GetSiteInstance()->decrement_active_frame_count(); |
174 | 174 |
175 // Notify the FrameTree that this RFH is going away, allowing it to shut down | 175 // Notify the FrameTree that this RFH is going away, allowing it to shut down |
176 // the corresponding RenderViewHost if it is no longer needed. | 176 // the corresponding RenderViewHost if it is no longer needed. |
177 frame_tree_->UnregisterRenderFrameHost(this); | 177 frame_tree_->UnregisterRenderFrameHost(this); |
178 | |
179 // NULL out the swapout timer; in crash dumps this member will be null only if | |
180 // the dtor has run. | |
181 swapout_event_monitor_timeout_.reset(); | |
Evan Stade
2014/12/10 22:02:18
sorta surprised scoped_ptr doesn't already null ou
ncarter (slow)
2014/12/10 22:09:50
I was surprised too, but it turns out that ~scoped
| |
178 } | 182 } |
179 | 183 |
180 int RenderFrameHostImpl::GetRoutingID() { | 184 int RenderFrameHostImpl::GetRoutingID() { |
181 return routing_id_; | 185 return routing_id_; |
182 } | 186 } |
183 | 187 |
184 SiteInstanceImpl* RenderFrameHostImpl::GetSiteInstance() { | 188 SiteInstanceImpl* RenderFrameHostImpl::GetSiteInstance() { |
185 return render_view_host_->GetSiteInstance(); | 189 return render_view_host_->GetSiteInstance(); |
186 } | 190 } |
187 | 191 |
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1576 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1580 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
1577 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1581 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
1578 GetContentClient()->browser()->RegisterPermissionUsage( | 1582 GetContentClient()->browser()->RegisterPermissionUsage( |
1579 PERMISSION_GEOLOCATION, | 1583 PERMISSION_GEOLOCATION, |
1580 delegate_->GetAsWebContents(), | 1584 delegate_->GetAsWebContents(), |
1581 GetLastCommittedURL().GetOrigin(), | 1585 GetLastCommittedURL().GetOrigin(), |
1582 top_frame->GetLastCommittedURL().GetOrigin()); | 1586 top_frame->GetLastCommittedURL().GetOrigin()); |
1583 } | 1587 } |
1584 | 1588 |
1585 } // namespace content | 1589 } // namespace content |
OLD | NEW |