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

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

Issue 22914008: Refactor kiosk app launch to be part of login screen UI flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
(Empty)
1 // Copyright (c) 2013 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 App install/launch splash screen implementation.
7 */
8
9 login.createScreen('AppLaunchSplashScreen', 'app-launch-splash', function() {
10 return {
11 EXTERNAL_API: [
12 'toggleNetworkConfig',
13 'updateApp',
14 'updateMessage',
15 ],
16
17 /**
18 * Event handler that is invoked just before the frame is shown.
19 * @param {string} data Screen init payload.
20 */
21 onBeforeShow: function(data) {
22 this.updateApp(data['appInfo']);
23
24 $('splash-shortcut-info').hidden = !data['shortcutEnabled'];
25
26 Oobe.getInstance().headerHidden = true;
27 },
28
29 /**
30 * Event handler that is invoked just before the frame is hidden.
31 */
32 onBeforeHide: function() {
33 },
34
35 /**
36 * Toggles visibility of the network configuration option.
37 * @param {boolean} visible Whether to show the option.
38 */
39 toggleNetworkConfig: function(visible) {
40 // TODO(tengs): Implement network configuration in app launch.
41 },
42
43 /**
44 * Updates the app name and icon.
45 * @param {Object} app Details of app being launched.
46 */
47 updateApp: function(app) {
48 $('splash-header').textContent = app.name;
49 $('splash-header').style.backgroundImage = 'url(' + app.iconURL + ')';
50 },
51
52 /**
53 * Updates the message for the current launch state.
54 * @param {string} message Description for current launch state.
55 */
56 updateMessage: function(message) {
57 $('splash-launch-text').textContent = message;
58 }
59 };
60 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698