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

Side by Side Diff: chrome/browser/resources/chromeos/login/display_manager.js

Issue 9836039: Add reporting notification to the enterprise banner on the CrOS login screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 8 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 | 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 /** 5 /**
6 * @fileoverview Display manager for WebUI OOBE and login. 6 * @fileoverview Display manager for WebUI OOBE and login.
7 */ 7 */
8 8
9 // TODO(xiyuan): Find a better to share those constants. 9 // TODO(xiyuan): Find a better to share those constants.
10 const SCREEN_GAIA_SIGNIN = 'gaia-signin'; 10 const SCREEN_GAIA_SIGNIN = 'gaia-signin';
11 const SCREEN_ACCOUNT_PICKER = 'account-picker'; 11 const SCREEN_ACCOUNT_PICKER = 'account-picker';
12 12
13 /* Accelerator identifiers. Must be kept in sync with webui_login_view.cc. */ 13 /* Accelerator identifiers. Must be kept in sync with webui_login_view.cc. */
14 const ACCELERATOR_ACCESSIBILITY = 'accessibility'; 14 const ACCELERATOR_ACCESSIBILITY = 'accessibility';
15 const ACCELERATOR_CANCEL = 'cancel'; 15 const ACCELERATOR_CANCEL = 'cancel';
16 const ACCELERATOR_ENROLLMENT = 'enrollment'; 16 const ACCELERATOR_ENROLLMENT = 'enrollment';
17 const ACCELERATOR_EXIT = 'exit'; 17 const ACCELERATOR_EXIT = 'exit';
18 const ACCELERATOR_VERSION = 'version'; 18 const ACCELERATOR_VERSION = 'version';
19 19
20 /* Help topic identifiers. */
21 const HELP_TOPIC_ENTERPRISE_REPORTING = 2535613;
22
20 cr.define('cr.ui.login', function() { 23 cr.define('cr.ui.login', function() {
21 var Bubble = cr.ui.Bubble; 24 var Bubble = cr.ui.Bubble;
22 25
23 /** 26 /**
24 * Constructor a display manager that manages initialization of screens, 27 * Constructor a display manager that manages initialization of screens,
25 * transitions, error messages display. 28 * transitions, error messages display.
26 * 29 *
27 * @constructor 30 * @constructor
28 */ 31 */
29 function DisplayManager() { 32 function DisplayManager() {
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 * @param {string} labelId Id of the label div. 401 * @param {string} labelId Id of the label div.
399 * @param {string} labelText Text for the label. 402 * @param {string} labelText Text for the label.
400 */ 403 */
401 DisplayManager.setLabelText = function(labelId, labelText) { 404 DisplayManager.setLabelText = function(labelId, labelText) {
402 $(labelId).textContent = labelText; 405 $(labelId).textContent = labelText;
403 }; 406 };
404 407
405 /** 408 /**
406 * Sets the text content of the enterprise info message. 409 * Sets the text content of the enterprise info message.
407 * @param {string} messageText The message text. 410 * @param {string} messageText The message text.
411 * @param {boolean} showReportingHint Whether to show the reporting warning.
408 */ 412 */
409 DisplayManager.setEnterpriseInfo = function(messageText) { 413 DisplayManager.setEnterpriseInfo = function(messageText, showReportingHint) {
410 $('enterprise-info-message').textContent = messageText; 414 $('enterprise-info-message').textContent = messageText;
411 if (messageText) 415 if (messageText) {
412 $('enterprise-info-container').hidden = false; 416 $('enterprise-info-container').hidden = false;
417 if (showReportingHint) {
418 $('enterprise-reporting-hint-container').hidden = false;
419 var link = $('enterprise-reporting-hint-link');
420 link.addEventListener('click', function(e) {
421 chrome.send('launchHelpApp', [HELP_TOPIC_ENTERPRISE_REPORTING]);
422 e.preventDefault();
423 });
424 }
425 }
413 }; 426 };
414 427
415 // Export 428 // Export
416 return { 429 return {
417 DisplayManager: DisplayManager 430 DisplayManager: DisplayManager
418 }; 431 };
419 }); 432 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/version_info_updater.cc ('k') | chrome/browser/resources/chromeos/login/login.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698