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

Side by Side Diff: remoting/webapp/crd/js/host_controller.js

Issue 1272833002: Pass error messages from native messaging to web-app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix start_host. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 'use strict'; 5 'use strict';
6 6
7 /** @suppress {duplicate} */ 7 /** @suppress {duplicate} */
8 var remoting = remoting || {}; 8 var remoting = remoting || {};
9 9
10 /** @constructor */ 10 /** @constructor */
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 if (!remoting.HostController.State.hasOwnProperty(state)) { 49 if (!remoting.HostController.State.hasOwnProperty(state)) {
50 throw "Invalid HostController.State: " + state; 50 throw "Invalid HostController.State: " + state;
51 } 51 }
52 return remoting.HostController.State[state]; 52 return remoting.HostController.State[state];
53 } 53 }
54 54
55 /** @enum {number} */ 55 /** @enum {number} */
56 remoting.HostController.AsyncResult = { 56 remoting.HostController.AsyncResult = {
57 OK: 0, 57 OK: 0,
58 FAILED: 1, 58 FAILED: 1,
59 CANCELLED: 2, 59 CANCELLED: 2
60 FAILED_DIRECTORY: 3
61 }; 60 };
62 61
63 /** 62 /**
64 * @param {string} result The async result name. 63 * @param {string} result The async result name.
65 * @return {remoting.HostController.AsyncResult} The result enum value. 64 * @return {remoting.HostController.AsyncResult} The result enum value.
66 */ 65 */
67 remoting.HostController.AsyncResult.fromString = function(result) { 66 remoting.HostController.AsyncResult.fromString = function(result) {
68 if (!remoting.HostController.AsyncResult.hasOwnProperty(result)) { 67 if (!remoting.HostController.AsyncResult.hasOwnProperty(result)) {
69 throw "Invalid HostController.AsyncResult: " + result; 68 throw "Invalid HostController.AsyncResult: " + result;
70 } 69 }
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 emailPromise.then(function(/** string */ email) { 491 emailPromise.then(function(/** string */ email) {
493 signalStrategy.connect(remoting.settings.XMPP_SERVER, email, token); 492 signalStrategy.connect(remoting.settings.XMPP_SERVER, email, token);
494 }); 493 });
495 }); 494 });
496 495
497 return result; 496 return result;
498 }; 497 };
499 498
500 /** @type {remoting.HostController} */ 499 /** @type {remoting.HostController} */
501 remoting.hostController = null; 500 remoting.hostController = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698