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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2387 // An error page is expected to commit, hence why is_loading_ is set to true. | 2387 // An error page is expected to commit, hence why is_loading_ is set to true. |
2388 is_loading_ = true; | 2388 is_loading_ = true; |
2389 frame_tree_node_->ResetNavigationRequest(true); | 2389 frame_tree_node_->ResetNavigationRequest(true); |
2390 } | 2390 } |
2391 | 2391 |
2392 void RenderFrameHostImpl::SetUpMojoIfNeeded() { | 2392 void RenderFrameHostImpl::SetUpMojoIfNeeded() { |
2393 if (interface_registry_.get()) | 2393 if (interface_registry_.get()) |
2394 return; | 2394 return; |
2395 | 2395 |
2396 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); | 2396 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); |
2397 if (!GetProcess()->GetServiceRegistry()) | 2397 if (!GetProcess()->GetRemoteInterfaces()) |
2398 return; | 2398 return; |
2399 | 2399 |
2400 RegisterMojoInterfaces(); | 2400 RegisterMojoInterfaces(); |
2401 mojom::FrameFactoryPtr frame_factory; | 2401 mojom::FrameFactoryPtr frame_factory; |
2402 GetProcess()->GetServiceRegistry()->ConnectToRemoteService( | 2402 GetProcess()->GetRemoteInterfaces()->GetInterface(&frame_factory); |
2403 mojo::GetProxy(&frame_factory)); | |
2404 | |
2405 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), | 2403 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), |
2406 frame_host_binding_.CreateInterfacePtrAndBind()); | 2404 frame_host_binding_.CreateInterfacePtrAndBind()); |
2407 | 2405 |
2408 | 2406 |
2409 shell::mojom::InterfaceProviderPtr remote_interfaces; | 2407 shell::mojom::InterfaceProviderPtr remote_interfaces; |
2410 shell::mojom::InterfaceProviderRequest remote_interfaces_request = | 2408 shell::mojom::InterfaceProviderRequest remote_interfaces_request = |
2411 GetProxy(&remote_interfaces); | 2409 GetProxy(&remote_interfaces); |
2412 remote_interfaces_.reset(new shell::InterfaceProvider); | 2410 remote_interfaces_.reset(new shell::InterfaceProvider); |
2413 remote_interfaces_->Bind(std::move(remote_interfaces)); | 2411 remote_interfaces_->Bind(std::move(remote_interfaces)); |
2414 frame_->GetInterfaceProvider(std::move(remote_interfaces_request)); | 2412 frame_->GetInterfaceProvider(std::move(remote_interfaces_request)); |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2960 // handler after it's destroyed so it can't run after the RFHI is destroyed. | 2958 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2959 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2960 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2963 } | 2961 } |
2964 | 2962 |
2965 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2963 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2966 web_bluetooth_service_.reset(); | 2964 web_bluetooth_service_.reset(); |
2967 } | 2965 } |
2968 | 2966 |
2969 } // namespace content | 2967 } // namespace content |
OLD | NEW |