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

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

Issue 979483002: [Chromoting] Remove hangout consent dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittest Created 5 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 2014 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 /**
6 * @fileoverview
7 * The entry point for dialog_hangout_consent.html.
8 */
9
10
11 /** @suppress {duplicate} */
12 var remoting = remoting || {};
13
14 (function() {
15
16 'use strict';
17
18 /**
19 * @constructor
20 * @param {HTMLElement} rootElement
21 * @param {string} requestToken
22 * @param {boolean} authorized Whether the user is authorized or not.
23 */
24 var ConsentDialog = function(rootElement, requestToken, authorized) {
25 /** @private */
26 this.okButton_ = rootElement.querySelector('.ok-button');
27 /** @private */
28 this.cancelButton_ = rootElement.querySelector('.cancel-button');
29 /** @private */
30 this.authSection_ = rootElement.querySelector('.auth-message');
31 /** @private */
32 this.requestToken_ = requestToken;
33
34 if (authorized) {
35 this.authSection_.hidden = true;
36 }
37
38 this.okButton_.addEventListener('click', this.onButton_.bind(this, true));
39 this.cancelButton_.addEventListener('click',this.onButton_.bind(this, false));
40 base.resizeWindowToContent();
41 };
42
43 /**
44 * @param {boolean} confirm
45 * @private
46 */
47 ConsentDialog.prototype.onButton_ = function(confirm) {
48 base.Ipc.invoke('remoting.HangoutConsentDialog.confirm', confirm,
49 this.requestToken_);
50 chrome.app.window.current().close();
51 };
52
53 function onDomContentLoaded() {
54 var params = base.getUrlParameters();
55 var authorized = getBooleanAttr(params, 'authorized', false);
56 var token = getStringAttr(params, 'token');
57 l10n.localize();
58 var confirmDialog = new ConsentDialog(document.body, token, authorized);
59 }
60
61 window.addEventListener('load', onDomContentLoaded);
62
63 }());
OLDNEW
« no previous file with comments | « remoting/webapp/crd/js/hangout_consent_dialog.js ('k') | remoting/webapp/crd/js/it2me_helpee_channel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698