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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 | 781 |
782 // Any future UpdateState or UpdateTitle messages from this or a recreated | 782 // Any future UpdateState or UpdateTitle messages from this or a recreated |
783 // process should be ignored until the next commit. | 783 // process should be ignored until the next commit. |
784 set_nav_entry_id(0); | 784 set_nav_entry_id(0); |
785 } | 785 } |
786 | 786 |
787 void RenderFrameHostImpl::Create( | 787 void RenderFrameHostImpl::Create( |
788 const shell::Identity& remote_identity, | 788 const shell::Identity& remote_identity, |
789 media::mojom::ServiceFactoryRequest request) { | 789 media::mojom::ServiceFactoryRequest request) { |
790 std::unique_ptr<shell::InterfaceRegistry> registry( | 790 std::unique_ptr<shell::InterfaceRegistry> registry( |
791 new shell::InterfaceRegistry(nullptr)); | 791 new shell::InterfaceRegistry); |
792 #if defined(OS_ANDROID) && defined(ENABLE_MOJO_CDM) | 792 #if defined(OS_ANDROID) && defined(ENABLE_MOJO_CDM) |
793 registry->AddInterface( | 793 registry->AddInterface( |
794 base::Bind(&ProvisionFetcherImpl::Create, this)); | 794 base::Bind(&ProvisionFetcherImpl::Create, this)); |
795 #endif | 795 #endif |
796 GetContentClient()->browser()->ExposeInterfacesToMediaService(registry.get(), | 796 GetContentClient()->browser()->ExposeInterfacesToMediaService(registry.get(), |
797 this); | 797 this); |
798 shell::mojom::InterfaceProviderPtr interfaces; | 798 shell::mojom::InterfaceProviderPtr interfaces; |
799 registry->Bind(GetProxy(&interfaces)); | 799 registry->Bind(GetProxy(&interfaces)); |
800 media_registries_.push_back(std::move(registry)); | 800 media_registries_.push_back(std::move(registry)); |
801 | 801 |
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2469 | 2469 |
2470 // An error page is expected to commit, hence why is_loading_ is set to true. | 2470 // An error page is expected to commit, hence why is_loading_ is set to true. |
2471 is_loading_ = true; | 2471 is_loading_ = true; |
2472 frame_tree_node_->ResetNavigationRequest(true); | 2472 frame_tree_node_->ResetNavigationRequest(true); |
2473 } | 2473 } |
2474 | 2474 |
2475 void RenderFrameHostImpl::SetUpMojoIfNeeded() { | 2475 void RenderFrameHostImpl::SetUpMojoIfNeeded() { |
2476 if (interface_registry_.get()) | 2476 if (interface_registry_.get()) |
2477 return; | 2477 return; |
2478 | 2478 |
2479 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); | 2479 interface_registry_.reset(new shell::InterfaceRegistry); |
2480 if (!GetProcess()->GetRemoteInterfaces()) | 2480 if (!GetProcess()->GetRemoteInterfaces()) |
2481 return; | 2481 return; |
2482 | 2482 |
2483 RegisterMojoInterfaces(); | 2483 RegisterMojoInterfaces(); |
2484 mojom::FrameFactoryPtr frame_factory; | 2484 mojom::FrameFactoryPtr frame_factory; |
2485 GetProcess()->GetRemoteInterfaces()->GetInterface(&frame_factory); | 2485 GetProcess()->GetRemoteInterfaces()->GetInterface(&frame_factory); |
2486 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), | 2486 frame_factory->CreateFrame(routing_id_, GetProxy(&frame_), |
2487 frame_host_binding_.CreateInterfacePtrAndBind()); | 2487 frame_host_binding_.CreateInterfacePtrAndBind()); |
2488 | 2488 |
2489 | 2489 |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3045 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( | 3045 web_bluetooth_service_->SetClientConnectionErrorHandler(base::Bind( |
3046 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); | 3046 &RenderFrameHostImpl::DeleteWebBluetoothService, base::Unretained(this))); |
3047 return web_bluetooth_service_.get(); | 3047 return web_bluetooth_service_.get(); |
3048 } | 3048 } |
3049 | 3049 |
3050 void RenderFrameHostImpl::DeleteWebBluetoothService() { | 3050 void RenderFrameHostImpl::DeleteWebBluetoothService() { |
3051 web_bluetooth_service_.reset(); | 3051 web_bluetooth_service_.reset(); |
3052 } | 3052 } |
3053 | 3053 |
3054 } // namespace content | 3054 } // namespace content |
OLD | NEW |