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

Unified Diff: services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java

Issue 1309233008: Move applications using play services to the shell. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 3 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
Index: services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java
diff --git a/services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java b/services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java
deleted file mode 100644
index 3ae0dabae5b07639eb768e03fcda788898275272..0000000000000000000000000000000000000000
--- a/services/authentication/src/org/chromium/mojo/authentication/AuthenticationApp.java
+++ /dev/null
@@ -1,72 +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.authentication;
-
-import android.content.Context;
-
-import org.chromium.mojo.application.ApplicationConnection;
-import org.chromium.mojo.application.ApplicationDelegate;
-import org.chromium.mojo.application.ApplicationRunner;
-import org.chromium.mojo.application.ServiceFactoryBinder;
-import org.chromium.mojo.bindings.InterfaceRequest;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
-import org.chromium.mojom.mojo.Shell;
-
-/**
- * Android service application implementing the AuthenticationService interface.
- */
-public class AuthenticationApp implements ApplicationDelegate {
- private final Context mContext;
- private final Core mCore;
- private Shell mShell;
-
- public AuthenticationApp(Context context, Core core) {
- mContext = context;
- mCore = core;
- }
-
- /**
- * @see ApplicationDelegate#initialize(Shell, String[], String)
- */
- @Override
- public void initialize(Shell shell, String[] args, String url) {
- mShell = shell;
- }
-
- /**
- * @see ApplicationDelegate#configureIncomingConnection(ApplicationConnection)
- */
- @Override
- public boolean configureIncomingConnection(final ApplicationConnection connection) {
- connection.addService(new ServiceFactoryBinder<AuthenticationService>() {
-
- @Override
- public void bind(InterfaceRequest<AuthenticationService> request) {
- AuthenticationService.MANAGER.bind(new AuthenticationServiceImpl(mContext, mCore,
- connection.getRequestorUrl(), mShell),
- request);
- }
-
- @Override
- public String getInterfaceName() {
- return AuthenticationService.MANAGER.getName();
- }
- });
- connection.addService(new NetworkServiceProxyFactory(connection, mContext, mCore, mShell));
- return true;
- }
-
- /**
- * @see ApplicationDelegate#quit()
- */
- @Override
- public void quit() {}
-
- public static void mojoMain(
- Context context, Core core, MessagePipeHandle applicationRequestHandle) {
- ApplicationRunner.run(new AuthenticationApp(context, core), core, applicationRequestHandle);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698