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

Side by Side Diff: remoting/webapp/app_remoting/js/ar_auth_dialog.js

Issue 1816653002: Remove app_remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /** @suppress {duplicate} */
6 var remoting = remoting || {};
7
8 (function() {
9
10 'use strict';
11
12 var instance_ = null;
13
14 /**
15 * @constructor
16 * @implements {remoting.Identity.ConsentDialog}
17 * @private
18 */
19 remoting.AuthDialog = function() {
20 /** @private {base.Deferred} */
21 this.deferred_ = null;
22 };
23
24 /**
25 * @return {Promise} A Promise object that resolves when the user clicks on the
26 * auth button.
27 */
28 remoting.AuthDialog.prototype.show = function() {
29 if (!this.deferred_) {
30 this.deferred_ = new base.Deferred();
31 remoting.MessageWindow.showMessageWindow(
32 l10n.getTranslationOrError(/*i18n-content*/'MODE_AUTHORIZE'),
33 l10n.getTranslationOrError(/*i18n-content*/'DESCRIPTION_AUTHORIZE'),
34 l10n.getTranslationOrError(/*i18n-content*/'CONTINUE_BUTTON'),
35 this.onOk_.bind(this));
36 }
37 return this.deferred_.promise();
38 };
39
40 /**
41 * @return {remoting.AuthDialog}
42 */
43 remoting.AuthDialog.getInstance = function() {
44 if (!instance_) {
45 instance_ = new remoting.AuthDialog();
46 }
47 return instance_;
48 };
49
50 remoting.AuthDialog.prototype.onOk_ = function() {
51 console.assert(this.deferred_ !== null, 'No deferred Promise found.');
52 this.deferred_.resolve();
53 this.deferred_ = null;
54 };
55
56 })();
OLDNEW
« no previous file with comments | « remoting/webapp/app_remoting/js/application_context_menu.js ('k') | remoting/webapp/app_remoting/js/ar_background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698