Chromium Code Reviews| 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 196 | 196 |
| 197 // Notify the FrameTree that this RFH is going away, allowing it to shut down | 197 // Notify the FrameTree that this RFH is going away, allowing it to shut down |
| 198 // the corresponding RenderViewHost if it is no longer needed. | 198 // the corresponding RenderViewHost if it is no longer needed. |
| 199 frame_tree_->UnregisterRenderFrameHost(this); | 199 frame_tree_->UnregisterRenderFrameHost(this); |
| 200 | 200 |
| 201 // NULL out the swapout timer; in crash dumps this member will be null only if | 201 // NULL out the swapout timer; in crash dumps this member will be null only if |
| 202 // the dtor has run. | 202 // the dtor has run. |
| 203 swapout_event_monitor_timeout_.reset(); | 203 swapout_event_monitor_timeout_.reset(); |
| 204 | 204 |
| 205 for (const auto& iter: visual_state_callbacks_) { | 205 for (const auto& iter: visual_state_callbacks_) { |
| 206 iter.second.Run(false); | 206 iter.second.Run(); |
|
piman
2015/02/24 21:51:23
I think we want to keep the bool here. We would wa
| |
| 207 } | 207 } |
| 208 | 208 |
| 209 if (render_widget_host_) | 209 if (render_widget_host_) |
| 210 render_widget_host_->Cleanup(); | 210 render_widget_host_->Cleanup(); |
| 211 } | 211 } |
| 212 | 212 |
| 213 int RenderFrameHostImpl::GetRoutingID() { | 213 int RenderFrameHostImpl::GetRoutingID() { |
| 214 return routing_id_; | 214 return routing_id_; |
| 215 } | 215 } |
| 216 | 216 |
| (...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1120 it->second.Run(result_value); | 1120 it->second.Run(result_value); |
| 1121 javascript_callbacks_.erase(it); | 1121 javascript_callbacks_.erase(it); |
| 1122 } else { | 1122 } else { |
| 1123 NOTREACHED() << "Received script response for unknown request"; | 1123 NOTREACHED() << "Received script response for unknown request"; |
| 1124 } | 1124 } |
| 1125 } | 1125 } |
| 1126 | 1126 |
| 1127 void RenderFrameHostImpl::OnVisualStateResponse(uint64 id) { | 1127 void RenderFrameHostImpl::OnVisualStateResponse(uint64 id) { |
| 1128 auto it = visual_state_callbacks_.find(id); | 1128 auto it = visual_state_callbacks_.find(id); |
| 1129 if (it != visual_state_callbacks_.end()) { | 1129 if (it != visual_state_callbacks_.end()) { |
| 1130 it->second.Run(true); | 1130 it->second.Run(); |
| 1131 visual_state_callbacks_.erase(it); | 1131 visual_state_callbacks_.erase(it); |
| 1132 } else { | 1132 } else { |
| 1133 NOTREACHED() << "Received script response for unknown request"; | 1133 NOTREACHED() << "Received script response for unknown request"; |
| 1134 } | 1134 } |
| 1135 } | 1135 } |
| 1136 | 1136 |
| 1137 void RenderFrameHostImpl::OnRunJavaScriptMessage( | 1137 void RenderFrameHostImpl::OnRunJavaScriptMessage( |
| 1138 const base::string16& message, | 1138 const base::string16& message, |
| 1139 const base::string16& default_prompt, | 1139 const base::string16& default_prompt, |
| 1140 const GURL& frame_url, | 1140 const GURL& frame_url, |
| (...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1886 void RenderFrameHostImpl::DidUseGeolocationPermission() { | 1886 void RenderFrameHostImpl::DidUseGeolocationPermission() { |
| 1887 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); | 1887 RenderFrameHost* top_frame = frame_tree_node()->frame_tree()->GetMainFrame(); |
| 1888 GetContentClient()->browser()->RegisterPermissionUsage( | 1888 GetContentClient()->browser()->RegisterPermissionUsage( |
| 1889 PERMISSION_GEOLOCATION, | 1889 PERMISSION_GEOLOCATION, |
| 1890 delegate_->GetAsWebContents(), | 1890 delegate_->GetAsWebContents(), |
| 1891 GetLastCommittedURL().GetOrigin(), | 1891 GetLastCommittedURL().GetOrigin(), |
| 1892 top_frame->GetLastCommittedURL().GetOrigin()); | 1892 top_frame->GetLastCommittedURL().GetOrigin()); |
| 1893 } | 1893 } |
| 1894 | 1894 |
| 1895 } // namespace content | 1895 } // namespace content |
| OLD | NEW |