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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/screen_app_launch_splash.js
diff --git a/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js b/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js
new file mode 100644
index 0000000000000000000000000000000000000000..4404bfad8f71572fcaddddaa2ff6e75f8bc46320
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/screen_app_launch_splash.js
@@ -0,0 +1,60 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview App install/launch splash screen implementation.
+ */
+
+login.createScreen('AppLaunchSplashScreen', 'app-launch-splash', function() {
+ return {
+ EXTERNAL_API: [
+ 'toggleNetworkConfig',
+ 'updateApp',
+ 'updateMessage',
+ ],
+
+ /**
+ * Event handler that is invoked just before the frame is shown.
+ * @param {string} data Screen init payload.
+ */
+ onBeforeShow: function(data) {
+ this.updateApp(data['appInfo']);
+
+ $('splash-shortcut-info').hidden = !data['shortcutEnabled'];
+
+ Oobe.getInstance().headerHidden = true;
+ },
+
+ /**
+ * Event handler that is invoked just before the frame is hidden.
+ */
+ onBeforeHide: function() {
+ },
+
+ /**
+ * Toggles visibility of the network configuration option.
+ * @param {boolean} visible Whether to show the option.
+ */
+ toggleNetworkConfig: function(visible) {
+ // TODO(tengs): Implement network configuration in app launch.
+ },
+
+ /**
+ * Updates the app name and icon.
+ * @param {Object} app Details of app being launched.
+ */
+ updateApp: function(app) {
+ $('splash-header').textContent = app.name;
+ $('splash-header').style.backgroundImage = 'url(' + app.iconURL + ')';
+ },
+
+ /**
+ * Updates the message for the current launch state.
+ * @param {string} message Description for current launch state.
+ */
+ updateMessage: function(message) {
+ $('splash-launch-text').textContent = message;
+ }
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698