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

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

Issue 10274022: Added extra text to 'host started' dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed tab. Created 8 years, 7 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
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/main.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 10 /**
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 */ 212 */
213 remoting.HostSetupDialog.prototype.updateState_ = function() { 213 remoting.HostSetupDialog.prototype.updateState_ = function() {
214 remoting.hostController.updateDom(); 214 remoting.hostController.updateDom();
215 215
216 /** @param {string} tag */ 216 /** @param {string} tag */
217 function showProcessingMessage(tag) { 217 function showProcessingMessage(tag) {
218 var messageDiv = document.getElementById('host-setup-processing-message'); 218 var messageDiv = document.getElementById('host-setup-processing-message');
219 l10n.localizeElementFromTag(messageDiv, tag); 219 l10n.localizeElementFromTag(messageDiv, tag);
220 remoting.setMode(remoting.AppMode.HOST_SETUP_PROCESSING); 220 remoting.setMode(remoting.AppMode.HOST_SETUP_PROCESSING);
221 } 221 }
222 /** @param {string} tag */ 222 /** @param {string} tag1
223 function showDoneMessage(tag) { 223 * @param {string=} opt_tag2 */
224 function showDoneMessage(tag1, opt_tag2) {
224 var messageDiv = document.getElementById('host-setup-done-message'); 225 var messageDiv = document.getElementById('host-setup-done-message');
225 l10n.localizeElementFromTag(messageDiv, tag); 226 l10n.localizeElementFromTag(messageDiv, tag1);
227 messageDiv = document.getElementById('host-setup-done-message-2');
228 if (opt_tag2) {
229 l10n.localizeElementFromTag(messageDiv, opt_tag2);
230 } else {
231 messageDiv.innerHTML = '';
232 }
226 remoting.setMode(remoting.AppMode.HOST_SETUP_DONE); 233 remoting.setMode(remoting.AppMode.HOST_SETUP_DONE);
227 } 234 }
228 /** @param {string} tag */ 235 /** @param {string} tag */
229 function showErrorMessage(tag) { 236 function showErrorMessage(tag) {
230 var errorDiv = document.getElementById('host-setup-error-message'); 237 var errorDiv = document.getElementById('host-setup-error-message');
231 l10n.localizeElementFromTag(errorDiv, tag); 238 l10n.localizeElementFromTag(errorDiv, tag);
232 remoting.setMode(remoting.AppMode.HOST_SETUP_ERROR); 239 remoting.setMode(remoting.AppMode.HOST_SETUP_ERROR);
233 } 240 }
234 241
235 var state = this.flow_.getState(); 242 var state = this.flow_.getState();
236 if (state == remoting.HostSetupFlow.State.NONE) { 243 if (state == remoting.HostSetupFlow.State.NONE) {
237 this.hide(); 244 this.hide();
238 } else if (state == remoting.HostSetupFlow.State.ASK_PIN) { 245 } else if (state == remoting.HostSetupFlow.State.ASK_PIN) {
239 remoting.setMode(remoting.AppMode.HOST_SETUP_ASK_PIN); 246 remoting.setMode(remoting.AppMode.HOST_SETUP_ASK_PIN);
240 } else if (state == remoting.HostSetupFlow.State.INSTALL_HOST) { 247 } else if (state == remoting.HostSetupFlow.State.INSTALL_HOST) {
241 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL); 248 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL);
242 window.location = 249 window.location =
243 'http://dl.google.com/chrome-remote-desktop/chromeremotedesktop.dmg'; 250 'http://dl.google.com/chrome-remote-desktop/chromeremotedesktop.dmg';
244 } else if (state == remoting.HostSetupFlow.State.STARTING_HOST) { 251 } else if (state == remoting.HostSetupFlow.State.STARTING_HOST) {
245 showProcessingMessage(/*i18n-content*/'HOST_SETUP_STARTING'); 252 showProcessingMessage(/*i18n-content*/'HOST_SETUP_STARTING');
246 this.startHost_(); 253 this.startHost_();
247 } else if (state == remoting.HostSetupFlow.State.UPDATING_PIN) { 254 } else if (state == remoting.HostSetupFlow.State.UPDATING_PIN) {
248 showProcessingMessage(/*i18n-content*/'HOST_SETUP_UPDATING_PIN'); 255 showProcessingMessage(/*i18n-content*/'HOST_SETUP_UPDATING_PIN');
249 this.updatePin_(); 256 this.updatePin_();
250 } else if (state == remoting.HostSetupFlow.State.STOPPING_HOST) { 257 } else if (state == remoting.HostSetupFlow.State.STOPPING_HOST) {
251 showProcessingMessage(/*i18n-content*/'HOST_SETUP_STOPPING'); 258 showProcessingMessage(/*i18n-content*/'HOST_SETUP_STOPPING');
252 this.stopHost_(); 259 this.stopHost_();
253 } else if (state == remoting.HostSetupFlow.State.HOST_STARTED) { 260 } else if (state == remoting.HostSetupFlow.State.HOST_STARTED) {
254 showDoneMessage(/*i18n-content*/'HOST_SETUP_STARTED'); 261 showDoneMessage(/*i18n-content*/'HOST_SETUP_STARTED',
262 /*i18n-content*/'HOST_SETUP_STARTED_DISABLE_SLEEP');
Sergey Ulanov 2012/05/01 01:16:32 Potentially the host plugin could verify power set
Sergey Ulanov 2012/05/01 01:16:32 Why can't this message be part of HOST_SETUP_START
Jamie 2012/05/01 01:35:23 That's a nice idea, but I don't think it's feasibl
Jamie 2012/05/01 01:35:23 Firstly, I try to avoid putting HTML in translated
255 } else if (state == remoting.HostSetupFlow.State.UPDATED_PIN) { 263 } else if (state == remoting.HostSetupFlow.State.UPDATED_PIN) {
256 showDoneMessage(/*i18n-content*/'HOST_SETUP_UPDATED_PIN'); 264 showDoneMessage(/*i18n-content*/'HOST_SETUP_UPDATED_PIN');
257 } else if (state == remoting.HostSetupFlow.State.HOST_STOPPED) { 265 } else if (state == remoting.HostSetupFlow.State.HOST_STOPPED) {
258 showDoneMessage(/*i18n-content*/'HOST_SETUP_STOPPED'); 266 showDoneMessage(/*i18n-content*/'HOST_SETUP_STOPPED');
259 } else if (state == remoting.HostSetupFlow.State.REGISTRATION_FAILED) { 267 } else if (state == remoting.HostSetupFlow.State.REGISTRATION_FAILED) {
260 showErrorMessage(/*i18n-content*/'HOST_SETUP_REGISTRATION_FAILED'); 268 showErrorMessage(/*i18n-content*/'HOST_SETUP_REGISTRATION_FAILED');
261 } else if (state == remoting.HostSetupFlow.State.START_HOST_FAILED) { 269 } else if (state == remoting.HostSetupFlow.State.START_HOST_FAILED) {
262 showErrorMessage(/*i18n-content*/'HOST_SETUP_HOST_FAILED'); 270 showErrorMessage(/*i18n-content*/'HOST_SETUP_HOST_FAILED');
263 } else if (state == remoting.HostSetupFlow.State.UPDATE_PIN_FAILED) { 271 } else if (state == remoting.HostSetupFlow.State.UPDATE_PIN_FAILED) {
264 showErrorMessage(/*i18n-content*/'HOST_SETUP_UPDATE_PIN_FAILED'); 272 showErrorMessage(/*i18n-content*/'HOST_SETUP_UPDATE_PIN_FAILED');
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 412
405 /** 413 /**
406 * @return {void} Nothing. 414 * @return {void} Nothing.
407 */ 415 */
408 remoting.HostSetupDialog.prototype.onInstallDialogRetry = function() { 416 remoting.HostSetupDialog.prototype.onInstallDialogRetry = function() {
409 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL); 417 remoting.setMode(remoting.AppMode.HOST_SETUP_INSTALL);
410 } 418 }
411 419
412 /** @type {remoting.HostSetupDialog} */ 420 /** @type {remoting.HostSetupDialog} */
413 remoting.hostSetupDialog = null; 421 remoting.hostSetupDialog = null;
OLDNEW
« no previous file with comments | « remoting/webapp/_locales/en/messages.json ('k') | remoting/webapp/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698