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 <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 2327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2338 const gfx::Rect& initial_rect, | 2338 const gfx::Rect& initial_rect, |
2339 bool user_gesture) { | 2339 bool user_gesture) { |
2340 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id, | 2340 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id, |
2341 disposition, initial_rect, user_gesture); | 2341 disposition, initial_rect, user_gesture); |
2342 } | 2342 } |
2343 | 2343 |
2344 void RenderFrameHostImpl::RegisterMojoInterfaces() { | 2344 void RenderFrameHostImpl::RegisterMojoInterfaces() { |
2345 device::GeolocationServiceContext* geolocation_service_context = | 2345 device::GeolocationServiceContext* geolocation_service_context = |
2346 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL; | 2346 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL; |
2347 | 2347 |
2348 #if !defined(OS_ANDROID) | 2348 // The default (no-op) implementation of InstalledAppProvider. |
2349 // The default (no-op) implementation of InstalledAppProvider. On Android, the | 2349 // TODO(mgiuca): Implement the "real" one for Android in Java, and do not add |
2350 // real implementation is provided in Java. | 2350 // the default one on that platform. |
2351 GetInterfaceRegistry()->AddInterface( | 2351 GetInterfaceRegistry()->AddInterface( |
2352 base::Bind(&InstalledAppProviderImplDefault::Create)); | 2352 base::Bind(&InstalledAppProviderImplDefault::Create)); |
2353 #endif // !defined(OS_ANDROID) | |
2354 | 2353 |
2355 if (geolocation_service_context) { | 2354 if (geolocation_service_context) { |
2356 // TODO(creis): Bind process ID here so that GeolocationServiceImpl | 2355 // TODO(creis): Bind process ID here so that GeolocationServiceImpl |
2357 // can perform permissions checks once site isolation is complete. | 2356 // can perform permissions checks once site isolation is complete. |
2358 // crbug.com/426384 | 2357 // crbug.com/426384 |
2359 // NOTE: At shutdown, there is no guaranteed ordering between destruction of | 2358 // NOTE: At shutdown, there is no guaranteed ordering between destruction of |
2360 // this object and destruction of any GeolocationServicesImpls created via | 2359 // this object and destruction of any GeolocationServicesImpls created via |
2361 // the below service registry, the reason being that the destruction of the | 2360 // the below service registry, the reason being that the destruction of the |
2362 // latter is triggered by receiving a message that the pipe was closed from | 2361 // latter is triggered by receiving a message that the pipe was closed from |
2363 // the renderer side. Hence, supply the reference to this object as a weak | 2362 // the renderer side. Hence, supply the reference to this object as a weak |
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 service_manager::mojom::InterfaceProviderPtr provider; | 3560 service_manager::mojom::InterfaceProviderPtr provider; |
3562 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); | 3561 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); |
3563 java_interfaces_.reset(new service_manager::InterfaceProvider); | 3562 java_interfaces_.reset(new service_manager::InterfaceProvider); |
3564 java_interfaces_->Bind(std::move(provider)); | 3563 java_interfaces_->Bind(std::move(provider)); |
3565 } | 3564 } |
3566 return java_interfaces_.get(); | 3565 return java_interfaces_.get(); |
3567 } | 3566 } |
3568 #endif | 3567 #endif |
3569 | 3568 |
3570 } // namespace content | 3569 } // namespace content |
OLD | NEW |