Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2706403014: Add Android implementation of navigator.getInstalledRelatedApps. (Closed)
Patch Set: Respond to review (importantly, getting the URL on every request, not caching). Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // The default (no-op) implementation of InstalledAppProvider. 2348 #if !defined(OS_ANDROID)
2349 // TODO(mgiuca): Implement the "real" one for Android in Java, and do not add 2349 // The default (no-op) implementation of InstalledAppProvider. On Android, the
2350 // the default one on that platform. 2350 // real implementation is provided in Java.
2351 GetInterfaceRegistry()->AddInterface( 2351 GetInterfaceRegistry()->AddInterface(
2352 base::Bind(&InstalledAppProviderImplDefault::Create)); 2352 base::Bind(&InstalledAppProviderImplDefault::Create));
2353 #endif // !defined(OS_ANDROID)
2353 2354
2354 if (geolocation_service_context) { 2355 if (geolocation_service_context) {
2355 // TODO(creis): Bind process ID here so that GeolocationServiceImpl 2356 // TODO(creis): Bind process ID here so that GeolocationServiceImpl
2356 // can perform permissions checks once site isolation is complete. 2357 // can perform permissions checks once site isolation is complete.
2357 // crbug.com/426384 2358 // crbug.com/426384
2358 // NOTE: At shutdown, there is no guaranteed ordering between destruction of 2359 // NOTE: At shutdown, there is no guaranteed ordering between destruction of
2359 // this object and destruction of any GeolocationServicesImpls created via 2360 // this object and destruction of any GeolocationServicesImpls created via
2360 // the below service registry, the reason being that the destruction of the 2361 // the below service registry, the reason being that the destruction of the
2361 // latter is triggered by receiving a message that the pipe was closed from 2362 // latter is triggered by receiving a message that the pipe was closed from
2362 // the renderer side. Hence, supply the reference to this object as a weak 2363 // 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
3560 service_manager::mojom::InterfaceProviderPtr provider; 3561 service_manager::mojom::InterfaceProviderPtr provider;
3561 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); 3562 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this);
3562 java_interfaces_.reset(new service_manager::InterfaceProvider); 3563 java_interfaces_.reset(new service_manager::InterfaceProvider);
3563 java_interfaces_->Bind(std::move(provider)); 3564 java_interfaces_->Bind(std::move(provider));
3564 } 3565 }
3565 return java_interfaces_.get(); 3566 return java_interfaces_.get();
3566 } 3567 }
3567 #endif 3568 #endif
3568 3569
3569 } // namespace content 3570 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698