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

Unified Diff: chrome/browser/resources/chromeos/login/login_login_oobe_shared.js

Issue 1808223003: Refactor oobe/login screens so lock screen can be loaded faster. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/login/login_login_oobe_shared.js
diff --git a/chrome/browser/resources/chromeos/login/login_login_oobe_shared.js b/chrome/browser/resources/chromeos/login/login_login_oobe_shared.js
new file mode 100644
index 0000000000000000000000000000000000000000..325b490c91b64ac7749c10613fc307c5365b64cd
--- /dev/null
+++ b/chrome/browser/resources/chromeos/login/login_login_oobe_shared.js
@@ -0,0 +1,63 @@
+// Copyright 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 Shared data between oobe and the login screens. These files
+ * are *not* used in the lock screen. If a file should also be used in the lock
+ * screen, added it to login_shared.js.
+ */
+
+<include src="network_dropdown.js">
+
+<include src="oobe_screen_reset_confirmation_overlay.js">
+<include src="oobe_screen_reset.js">
+<include src="oobe_screen_autolaunch.js">
+<include src="oobe_screen_enable_kiosk.js">
+<include src="oobe_screen_terms_of_service.js">
+<include src="oobe_screen_user_image.js">
+
+<include src="screen_app_launch_splash.js">
+<include src="screen_error_message.js">
+<include src="screen_gaia_signin.js">
+<include src="screen_password_changed.js">
+<include src="screen_supervised_user_creation.js">
+<include src="screen_tpm_error.js">
+<include src="screen_wrong_hwid.js">
+<include src="screen_confirm_password.js">
+<include src="screen_fatal_error.js">
+<include src="screen_device_disabled.js">
+<include src="screen_unrecoverable_cryptohome_error.js">
+
+// Allow selection events on components with editable text (password field)
+// bug (http://code.google.com/p/chromium/issues/detail?id=125863)
+disableTextSelectAndDrag(function(e) {
dzhioev (left Google) 2016/03/25 22:17:36 I think this should be done in login_shared.js, as
jdufault 2016/03/28 17:30:38 Done.
+ var src = e.target;
+ return src instanceof HTMLTextAreaElement ||
+ src instanceof HTMLInputElement &&
+ /text|password|search/.test(src.type);
+});
+
+// Register assets for async loading.
+[{
+ id: SCREEN_OOBE_ENROLLMENT,
+ html: [{ url: 'chrome://oobe/enrollment.html', targetID: 'inner-container' }],
+ css: ['chrome://oobe/enrollment.css'],
+ js: ['chrome://oobe/enrollment.js']
+}].forEach(cr.ui.login.ResourceLoader.registerAssets);
+
+(function() {
+ 'use strict';
+
+ document.addEventListener('DOMContentLoaded', function() {
+ // Immediately load async assets.
+ // TODO(dconnelly): remove this at some point and only load as needed.
+ // See crbug.com/236426
+ cr.ui.login.ResourceLoader.loadAssets(SCREEN_OOBE_ENROLLMENT, function() {
+ // This screen is async-loaded so we manually trigger i18n processing.
+ i18nTemplate.process($('oauth-enrollment'), loadTimeData);
+ // Delayed binding since this isn't defined yet.
+ login.OAuthEnrollmentScreen.register();
+ });
+ });
+})();

Powered by Google App Engine
This is Rietveld 408576698