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

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

Issue 2250183003: Make the fuchsia mojo/public repo the source of truth. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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: mojo/public/java/application/src/org/chromium/mojo/application/ApplicationImpl.java
diff --git a/mojo/public/java/application/src/org/chromium/mojo/application/ApplicationImpl.java b/mojo/public/java/application/src/org/chromium/mojo/application/ApplicationImpl.java
deleted file mode 100644
index e43dbe4dad44f86016d4044ddf1c63eedbc4713c..0000000000000000000000000000000000000000
--- a/mojo/public/java/application/src/org/chromium/mojo/application/ApplicationImpl.java
+++ /dev/null
@@ -1,70 +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.InterfaceRequest;
-import org.chromium.mojo.system.Core;
-import org.chromium.mojo.system.MessagePipeHandle;
-import org.chromium.mojo.system.MojoException;
-import org.chromium.mojom.mojo.Application;
-import org.chromium.mojom.mojo.ServiceProvider;
-import org.chromium.mojom.mojo.Shell;
-
-import java.util.ArrayList;
-
-/**
- * Utility class for communicating with the Shell, and provide Services to clients.
- */
-class ApplicationImpl implements Application {
- private final ApplicationDelegate mApplicationDelegate;
- private final ArrayList<ApplicationConnection> mIncomingConnections =
- new ArrayList<ApplicationConnection>();
- private final Core mCore;
- private Shell mShell;
-
- public ApplicationImpl(
- ApplicationDelegate delegate, Core core, MessagePipeHandle applicationRequest) {
- mApplicationDelegate = delegate;
- mCore = core;
- ApplicationImpl.MANAGER.bind(this, applicationRequest);
- }
-
- @Override
- public void initialize(Shell shell, String[] args, String url) {
- mShell = shell;
- mApplicationDelegate.initialize(shell, args, url);
- }
-
- @Override
- public void acceptConnection(String requestorUrl, String connectionUrl,
- InterfaceRequest<ServiceProvider> services) {
- ApplicationConnection connection = new ApplicationConnection(requestorUrl, connectionUrl);
- if (services != null && mApplicationDelegate.configureIncomingConnection(connection)) {
- ServiceProvider.MANAGER.bind(connection.getLocalServiceProvider(), services);
- mIncomingConnections.add(connection);
- } else {
- connection.close();
- }
- }
-
- @Override
- public void requestQuit() {
- mApplicationDelegate.quit();
- for (ApplicationConnection connection : mIncomingConnections) {
- connection.close();
- }
- mCore.getCurrentRunLoop().quit();
- }
-
- @Override
- public void close() {
- if (mShell != null) {
- mShell.close();
- }
- }
-
- @Override
- public void onConnectionError(MojoException e) {}
-}

Powered by Google App Engine
This is Rietveld 408576698