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

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

Issue 2706403014: Add Android implementation of navigator.getInstalledRelatedApps. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2389 matching lines...) Expand 10 before | Expand all | Expand 10 after
2400 const gfx::Rect& initial_rect, 2400 const gfx::Rect& initial_rect,
2401 bool user_gesture) { 2401 bool user_gesture) {
2402 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id, 2402 delegate_->ShowCreatedWindow(GetProcess()->GetID(), pending_widget_routing_id,
2403 disposition, initial_rect, user_gesture); 2403 disposition, initial_rect, user_gesture);
2404 } 2404 }
2405 2405
2406 void RenderFrameHostImpl::RegisterMojoInterfaces() { 2406 void RenderFrameHostImpl::RegisterMojoInterfaces() {
2407 device::GeolocationServiceContext* geolocation_service_context = 2407 device::GeolocationServiceContext* geolocation_service_context =
2408 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL; 2408 delegate_ ? delegate_->GetGeolocationServiceContext() : NULL;
2409 2409
2410 // The default (no-op) implementation of InstalledAppProvider. 2410 #if !defined(OS_ANDROID)
2411 // TODO(mgiuca): Implement the "real" one for Android in Java, and do not add 2411 // The default (no-op) implementation of InstalledAppProvider. On Android, the
2412 // the default one on that platform. 2412 // real implementation is provided in Java.
2413 GetInterfaceRegistry()->AddInterface( 2413 GetInterfaceRegistry()->AddInterface(
2414 base::Bind(&InstalledAppProviderImplDefault::Create)); 2414 base::Bind(&InstalledAppProviderImplDefault::Create));
2415 #endif // !defined(OS_ANDROID)
2415 2416
2416 if (geolocation_service_context) { 2417 if (geolocation_service_context) {
2417 // TODO(creis): Bind process ID here so that GeolocationServiceImpl 2418 // TODO(creis): Bind process ID here so that GeolocationServiceImpl
2418 // can perform permissions checks once site isolation is complete. 2419 // can perform permissions checks once site isolation is complete.
2419 // crbug.com/426384 2420 // crbug.com/426384
2420 // NOTE: At shutdown, there is no guaranteed ordering between destruction of 2421 // NOTE: At shutdown, there is no guaranteed ordering between destruction of
2421 // this object and destruction of any GeolocationServicesImpls created via 2422 // this object and destruction of any GeolocationServicesImpls created via
2422 // the below service registry, the reason being that the destruction of the 2423 // the below service registry, the reason being that the destruction of the
2423 // latter is triggered by receiving a message that the pipe was closed from 2424 // latter is triggered by receiving a message that the pipe was closed from
2424 // the renderer side. Hence, supply the reference to this object as a weak 2425 // 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
3622 service_manager::mojom::InterfaceProviderPtr provider; 3623 service_manager::mojom::InterfaceProviderPtr provider;
3623 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this); 3624 BindInterfaceRegistryForRenderFrameHost(mojo::MakeRequest(&provider), this);
3624 java_interfaces_.reset(new service_manager::InterfaceProvider); 3625 java_interfaces_.reset(new service_manager::InterfaceProvider);
3625 java_interfaces_->Bind(std::move(provider)); 3626 java_interfaces_->Bind(std::move(provider));
3626 } 3627 }
3627 return java_interfaces_.get(); 3628 return java_interfaces_.get();
3628 } 3629 }
3629 #endif 3630 #endif
3630 3631
3631 } // namespace content 3632 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | content/public/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698