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 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2402 GetProcess()->GetServiceRegistry()->ConnectToRemoteService( | 2402 GetProcess()->GetServiceRegistry()->ConnectToRemoteService( |
2403 mojo::GetProxy(&frame_factory)); | 2403 mojo::GetProxy(&frame_factory)); |
2404 | 2404 |
2405 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), | 2405 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), |
2406 frame_host_binding_.CreateInterfacePtrAndBind()); | 2406 frame_host_binding_.CreateInterfacePtrAndBind()); |
2407 | 2407 |
2408 | 2408 |
2409 shell::mojom::InterfaceProviderPtr remote_interfaces; | 2409 shell::mojom::InterfaceProviderPtr remote_interfaces; |
2410 shell::mojom::InterfaceProviderRequest remote_interfaces_request = | 2410 shell::mojom::InterfaceProviderRequest remote_interfaces_request = |
2411 GetProxy(&remote_interfaces); | 2411 GetProxy(&remote_interfaces); |
2412 remote_interfaces_.reset( | 2412 remote_interfaces_.reset(new shell::InterfaceProvider); |
2413 new shell::InterfaceProvider(std::move(remote_interfaces))); | 2413 remote_interfaces_->Bind(std::move(remote_interfaces)); |
2414 frame_->GetInterfaceProvider(std::move(remote_interfaces_request)); | 2414 frame_->GetInterfaceProvider(std::move(remote_interfaces_request)); |
2415 | 2415 |
2416 #if defined(OS_ANDROID) | 2416 #if defined(OS_ANDROID) |
2417 service_registry_android_ = | 2417 service_registry_android_ = |
2418 ServiceRegistryAndroid::Create(interface_registry_.get(), | 2418 ServiceRegistryAndroid::Create(interface_registry_.get(), |
2419 remote_interfaces_.get()); | 2419 remote_interfaces_.get()); |
2420 ServiceRegistrarAndroid::RegisterFrameHostServices( | 2420 ServiceRegistrarAndroid::RegisterFrameHostServices( |
2421 service_registry_android_.get()); | 2421 service_registry_android_.get()); |
2422 #endif | 2422 #endif |
2423 } | 2423 } |
(...skipping 536 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. | 2960 // handler after it's destroyed so it can't run after the RFHI is destroyed. |
2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 2961 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 2962 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
2963 } | 2963 } |
2964 | 2964 |
2965 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 2965 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
2966 web_bluetooth_service_.reset(); | 2966 web_bluetooth_service_.reset(); |
2967 } | 2967 } |
2968 | 2968 |
2969 } // namespace content | 2969 } // namespace content |
OLD | NEW |