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

Unified Diff: mojo/services/public/js/shell.js

Issue 861683003: Move services code brought in from Mojo to live under //third_party. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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 | « mojo/services/public/js/service_provider.js ('k') | mojo/services/public/sky/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/public/js/shell.js
diff --git a/mojo/services/public/js/shell.js b/mojo/services/public/js/shell.js
deleted file mode 100644
index e6c2dee1fdb0a2d1e032c6220cd41f2a93d9c1dc..0000000000000000000000000000000000000000
--- a/mojo/services/public/js/shell.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright 2014 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.
-
-define("mojo/services/public/js/shell", [
- "mojo/public/js/bindings",
- "mojo/public/js/core",
- "mojo/public/js/connection",
- "mojo/public/interfaces/application/shell.mojom",
- "mojo/public/interfaces/application/service_provider.mojom",
- "mojo/services/public/js/service_provider","console",
-], function(bindings, core, connection, shellMojom, spMojom, sp, console) {
-
- const ProxyBindings = bindings.ProxyBindings;
- const StubBindings = bindings.StubBindings;
- const ServiceProvider = sp.ServiceProvider;
- const ServiceProviderInterface = spMojom.ServiceProvider;
- const ShellInterface = shellMojom.Shell;
-
- class Shell {
- constructor(shellProxy) {
- this.shellProxy = shellProxy;
- this.applications_ = new Map();
- }
-
- connectToApplication(url) {
- var application = this.applications_.get(url);
- if (application)
- return application;
-
- var application = new ServiceProvider();
- this.shellProxy.connectToApplication(url,
- function(services) {
- application.proxy = services;
- },
- application);
- this.applications_.set(url, application);
- return application;
- }
-
- connectToService(url, service, client) {
- return this.connectToApplication(url).requestService(service, client);
- };
-
- close() {
- this.applications_.forEach(function(application, url) {
- application.close();
- });
- ProxyBindings(this.shellProxy).close();
- this.applications_.clear();
- }
- }
-
- var exports = {};
- exports.Shell = Shell;
- return exports;
-});
« no previous file with comments | « mojo/services/public/js/service_provider.js ('k') | mojo/services/public/sky/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698