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

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

Issue 10825187: Suppress "errors" that aren't really errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added JSCompiler hints. Created 8 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 | Annotate | Revision Log
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 28 matching lines...) Expand all
39 document.getElementById('statistics')); 39 document.getElementById('statistics'));
40 remoting.formatIq = new remoting.FormatIq(); 40 remoting.formatIq = new remoting.FormatIq();
41 remoting.hostList = new remoting.HostList( 41 remoting.hostList = new remoting.HostList(
42 document.getElementById('host-list'), 42 document.getElementById('host-list'),
43 document.getElementById('host-list-empty'), 43 document.getElementById('host-list-empty'),
44 document.getElementById('host-list-error-message'), 44 document.getElementById('host-list-error-message'),
45 document.getElementById('host-list-refresh-failed-button')); 45 document.getElementById('host-list-refresh-failed-button'));
46 remoting.toolbar = new remoting.Toolbar( 46 remoting.toolbar = new remoting.Toolbar(
47 document.getElementById('session-toolbar')); 47 document.getElementById('session-toolbar'));
48 remoting.clipboard = new remoting.Clipboard(); 48 remoting.clipboard = new remoting.Clipboard();
49 remoting.suspendMonitor = new remoting.SuspendMonitor(
50 function() {
51 if (remoting.clientSession) {
52 remoting.clientSession.logErrors(false);
Wez 2012/08/07 00:01:00 The assumption is that once we've suspended there
Jamie 2012/08/07 00:37:04 Yes. We don't invoke the callback unless the devic
53 }
54 }
55 );
49 56
50 remoting.oauth2.getEmail(remoting.onEmail, remoting.showErrorMessage); 57 remoting.oauth2.getEmail(remoting.onEmail, remoting.showErrorMessage);
51 58
52 remoting.showOrHideIt2MeUi(); 59 remoting.showOrHideIt2MeUi();
53 remoting.showOrHideMe2MeUi(); 60 remoting.showOrHideMe2MeUi();
54 61
55 // The plugin's onFocus handler sends a paste command to |window|, because 62 // The plugin's onFocus handler sends a paste command to |window|, because
56 // it can't send one to the plugin element itself. 63 // it can't send one to the plugin element itself.
57 window.addEventListener('paste', pluginGotPaste_, false); 64 window.addEventListener('paste', pluginGotPaste_, false);
58 window.addEventListener('copy', pluginGotCopy_, false); 65 window.addEventListener('copy', pluginGotCopy_, false);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 */ 309 */
303 remoting.showErrorMessage = function(error) { 310 remoting.showErrorMessage = function(error) {
304 l10n.localizeElementFromTag( 311 l10n.localizeElementFromTag(
305 document.getElementById('token-refresh-error-message'), 312 document.getElementById('token-refresh-error-message'),
306 error); 313 error);
307 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED); 314 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED);
308 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed; 315 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed;
309 document.getElementById('token-refresh-other-error').hidden = auth_failed; 316 document.getElementById('token-refresh-other-error').hidden = auth_failed;
310 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED); 317 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED);
311 }; 318 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698