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

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

Issue 339613003: Remove the blue tool-bar for apps v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use classes for help and feedback elements. Created 6 years, 5 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 /** @type {remoting.HostSession} */ remoting.hostSession = null; 10 /** @type {remoting.HostSession} */ remoting.hostSession = null;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 document.getElementById('host-list-empty'), 87 document.getElementById('host-list-empty'),
88 document.getElementById('host-list-error-message'), 88 document.getElementById('host-list-error-message'),
89 document.getElementById('host-list-refresh-failed-button'), 89 document.getElementById('host-list-refresh-failed-button'),
90 document.getElementById('host-list-loading-indicator')); 90 document.getElementById('host-list-loading-indicator'));
91 remoting.toolbar = new remoting.Toolbar( 91 remoting.toolbar = new remoting.Toolbar(
92 document.getElementById('session-toolbar')); 92 document.getElementById('session-toolbar'));
93 remoting.clipboard = new remoting.Clipboard(); 93 remoting.clipboard = new remoting.Clipboard();
94 var sandbox = /** @type {HTMLIFrameElement} */ 94 var sandbox = /** @type {HTMLIFrameElement} */
95 document.getElementById('wcs-sandbox'); 95 document.getElementById('wcs-sandbox');
96 remoting.wcsSandbox = new remoting.WcsSandboxContainer(sandbox.contentWindow); 96 remoting.wcsSandbox = new remoting.WcsSandboxContainer(sandbox.contentWindow);
97 var menuFeedback = new remoting.Feedback( 97 var homeFeedback = new remoting.MenuButton(
98 document.getElementById('help-feedback-main'), 98 document.getElementById('help-feedback-main'));
99 document.getElementById('help-main'), 99 var toolbarFeedback = new remoting.MenuButton(
100 document.getElementById('send-feedback-main')); 100 document.getElementById('help-feedback-toolbar'));
101 var toolbarFeedback = new remoting.Feedback( 101 remoting.manageHelpAndFeedback(
102 document.getElementById('help-feedback-toolbar'), 102 document.getElementById('title-bar'));
103 document.getElementById('help-toolbar'), 103 remoting.manageHelpAndFeedback(
104 document.getElementById('send-feedback-toolbar')); 104 document.getElementById('help-feedback-toolbar'));
105 remoting.manageHelpAndFeedback(
106 document.getElementById('help-feedback-main'));
105 107
106 /** @param {remoting.Error} error */ 108 /** @param {remoting.Error} error */
107 var onGetEmailError = function(error) { 109 var onGetEmailError = function(error) {
108 // No need to show the error message for NOT_AUTHENTICATED 110 // No need to show the error message for NOT_AUTHENTICATED
109 // because we will show "auth-dialog". 111 // because we will show "auth-dialog".
110 if (error != remoting.Error.NOT_AUTHENTICATED) { 112 if (error != remoting.Error.NOT_AUTHENTICATED) {
111 remoting.showErrorMessage(error); 113 remoting.showErrorMessage(error);
112 } 114 }
113 } 115 }
114 remoting.identity.getEmail(remoting.onEmail, onGetEmailError); 116 remoting.identity.getEmail(remoting.onEmail, onGetEmailError);
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 /** 520 /**
519 * Generate a nonce, to be used as an xsrf protection token. 521 * Generate a nonce, to be used as an xsrf protection token.
520 * 522 *
521 * @return {string} A URL-Safe Base64-encoded 128-bit random value. */ 523 * @return {string} A URL-Safe Base64-encoded 128-bit random value. */
522 remoting.generateXsrfToken = function() { 524 remoting.generateXsrfToken = function() {
523 var random = new Uint8Array(16); 525 var random = new Uint8Array(16);
524 window.crypto.getRandomValues(random); 526 window.crypto.getRandomValues(random);
525 var base64Token = window.btoa(String.fromCharCode.apply(null, random)); 527 var base64Token = window.btoa(String.fromCharCode.apply(null, random));
526 return base64Token.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, ''); 528 return base64Token.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
527 }; 529 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698