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

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

Issue 782693004: Update mojo sdk to rev f6c8ec07c01deebc13178d516225fd12695c3dc2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hack mojo_system_impl gypi for android :| Created 6 years 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/services/public/js/application.js
diff --git a/mojo/services/public/js/application.js b/mojo/services/public/js/application.js
new file mode 100644
index 0000000000000000000000000000000000000000..58934241994b85e5494aba9ddbc0a7119b808b2d
--- /dev/null
+++ b/mojo/services/public/js/application.js
@@ -0,0 +1,42 @@
+// 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/application", [
+ "services/js/app_bridge",
+ "mojo/services/public/js/service_provider",
+ "mojo/services/public/js/shell",
+], function(appBridgeModule, spModule, shellModule) {
+
+ class Application {
+ constructor(appShell, url) {
+ this.shell = new shellModule.Shell(appShell);
+ this.url = url;
+ this.serviceProviders = [];
+ }
+
+ initialize(args) {
+ }
+
+ acceptConnection_(url, spHandle) {
+ var serviceProvider = new spModule.ServiceProvider(spHandle);
+ this.serviceProviders.push(serviceProvider);
+ this.acceptConnection(url, serviceProvider);
+ }
+
+ acceptConnection(url, serviceProvider) {
+ }
+
+ quit() {
+ this.shell.close();
+ this.serviceProviders.forEach(function(sp) {
+ sp.close();
+ });
+ appBridgeModule.quit();
+ }
+ }
+
+ var exports = {};
+ exports.Application = Application;
+ return exports;
+});

Powered by Google App Engine
This is Rietveld 408576698