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

Unified Diff: third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ShellHelper.java

Issue 1131753005: Move Android Mojo application files to mojo/application from third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ShellHelper.java
diff --git a/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ShellHelper.java b/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ShellHelper.java
deleted file mode 100644
index 705e22e12c1b9ff6f339130782993da2896a4bf9..0000000000000000000000000000000000000000
--- a/third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ShellHelper.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.mojo.application;
-
-import org.chromium.mojo.bindings.Interface;
-import org.chromium.mojo.bindings.Interface.Proxy;
-import org.chromium.mojo.bindings.InterfaceRequest;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.Pair;
-import org.chromium.mojom.mojo.ServiceProvider;
-import org.chromium.mojom.mojo.Shell;
-
-/**
- * Helper class to help connecting to other application through the shell.
- */
-public class ShellHelper {
- /**
- * Connects to a service in another application.
- *
- * @param core Implementation of the {@link Core} api.
- * @param shell Instance of the shell.
- * @param application URL to the application to use.
- * @param manager {@link org.chromium.mojo.bindings.Interface.Manager} for the service to
- * connect to.
- * @return a proxy to the service.
- */
- public static <I extends Interface, P extends Proxy> P connectToService(
- Core core, Shell shell, String application, Interface.Manager<I, P> manager) {
- Pair<ServiceProvider.Proxy, InterfaceRequest<ServiceProvider>> providerRequest =
- ServiceProvider.MANAGER.getInterfaceRequest(core);
- try (ServiceProvider.Proxy provider = providerRequest.first) {
- shell.connectToApplication(application, providerRequest.second, null);
- Pair<P, InterfaceRequest<I>> serviceRequest = manager.getInterfaceRequest(core);
- provider.connectToService(manager.getName(), serviceRequest.second.passHandle());
- return serviceRequest.first;
- }
- }
-}
« no previous file with comments | « third_party/mojo/src/mojo/public/java/application/src/org/chromium/mojo/application/ServiceFactoryBinder.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698