| 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 is_swapped_out_(is_swapped_out), | 160 is_swapped_out_(is_swapped_out), |
| 161 weak_ptr_factory_(this) { | 161 weak_ptr_factory_(this) { |
| 162 frame_tree_->RegisterRenderFrameHost(this); | 162 frame_tree_->RegisterRenderFrameHost(this); |
| 163 GetProcess()->AddRoute(routing_id_, this); | 163 GetProcess()->AddRoute(routing_id_, this); |
| 164 g_routing_id_frame_map.Get().insert(std::make_pair( | 164 g_routing_id_frame_map.Get().insert(std::make_pair( |
| 165 RenderFrameHostID(GetProcess()->GetID(), routing_id_), | 165 RenderFrameHostID(GetProcess()->GetID(), routing_id_), |
| 166 this)); | 166 this)); |
| 167 | 167 |
| 168 if (GetProcess()->GetServiceRegistry()) { | 168 if (GetProcess()->GetServiceRegistry()) { |
| 169 RenderFrameSetupPtr setup; | 169 RenderFrameSetupPtr setup; |
| 170 GetProcess()->GetServiceRegistry()->GetRemoteInterface(&setup); | 170 GetProcess()->GetServiceRegistry()->ConnectToRemoteService(&setup); |
| 171 mojo::IInterfaceProviderPtr service_provider; | 171 mojo::ServiceProviderPtr service_provider; |
| 172 setup->GetServiceProviderForFrame(routing_id_, | 172 setup->GetServiceProviderForFrame(routing_id_, |
| 173 mojo::Get(&service_provider)); | 173 mojo::Get(&service_provider)); |
| 174 service_registry_.BindRemoteServiceProvider( | 174 service_registry_.BindRemoteServiceProvider( |
| 175 service_provider.PassMessagePipe()); | 175 service_provider.PassMessagePipe()); |
| 176 } | 176 } |
| 177 } | 177 } |
| 178 | 178 |
| 179 RenderFrameHostImpl::~RenderFrameHostImpl() { | 179 RenderFrameHostImpl::~RenderFrameHostImpl() { |
| 180 GetProcess()->RemoveRoute(routing_id_); | 180 GetProcess()->RemoveRoute(routing_id_); |
| 181 g_routing_id_frame_map.Get().erase( | 181 g_routing_id_frame_map.Get().erase( |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 FROM_HERE, | 944 FROM_HERE, |
| 945 base::Bind( | 945 base::Bind( |
| 946 &TransitionRequestManager::SetHasPendingTransitionRequest, | 946 &TransitionRequestManager::SetHasPendingTransitionRequest, |
| 947 base::Unretained(TransitionRequestManager::GetInstance()), | 947 base::Unretained(TransitionRequestManager::GetInstance()), |
| 948 GetProcess()->GetID(), | 948 GetProcess()->GetID(), |
| 949 routing_id_, | 949 routing_id_, |
| 950 has_pending_request)); | 950 has_pending_request)); |
| 951 } | 951 } |
| 952 | 952 |
| 953 } // namespace content | 953 } // namespace content |
| OLD | NEW |