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

Unified Diff: chrome/browser/resources/chromeos/oobe.js

Issue 7076014: [cros] Initial implementation for OOBE WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/chromeos/oobe.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/oobe.js
diff --git a/chrome/browser/resources/chromeos/oobe.js b/chrome/browser/resources/chromeos/oobe.js
new file mode 100644
index 0000000000000000000000000000000000000000..08087c57fcf627f4fd2a9da31e138b4a9187e302
--- /dev/null
+++ b/chrome/browser/resources/chromeos/oobe.js
@@ -0,0 +1,79 @@
+// Copyright (c) 2011 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.
+
+cr.define('cr.ui', function() {
+
+ function Oobe() {
+ }
+
+ cr.addSingletonGetter(Oobe);
+
+ // State of the screen.
+ Oobe.SCREEN_LOADING = -1;
+ Oobe.SCREEN_NONE = 0,
+ Oobe.SCREEN_WELCOME = 1,
+ Oobe.SCREEN_EULA = 2;
+ Oobe.SCREEN_UPDATE = 3;
+
+ Oobe.localStrings_ = new LocalStrings();
+
+ Oobe.prototype = {
+ initialized_: false,
+ state_: Oobe.SCREEN_LOADING,
+
+ changeState_: function(screenInfo) {
+ var newState = screenInfo.state;
+ this.hideAll_();
+ switch(newState) {
+ case Oobe.SCREEN_LOADING:
+ break;
+ case Oobe.SCREEN_NONE:
+ break;
+ case Oobe.SCREEN_WELCOME:
+ $('welcome-screen').hidden = false;
+ break;
+ case Oobe.SCREEN_EULA:
+ $('eula-screen').hidden = false;
+ break;
+ case Oobe.SCREEN_UPDATE:
+ break;
+ }
+ this.state_ = newState;
+ },
+
+ hideAll_: function() {
+ $('welcome-screen').hidden = true;
+ $('eula-screen').hidden = true;
+ },
+ };
+
+ Oobe.initialize = function() {
+ this.initialized_ = true;
+
+ $('continue').addEventListener('click', function(event) {
+ // TODO
+ });
+ $('back').addEventListener('click', function(event) {
+ // TODO
+ });
+ $('accept').addEventListener('click', function(event) {
+ // TODO
+ });
+ chrome.send('screenStateInitialize');
+ };
+
+ Oobe.screenStateChanged = function(screenInfo) {
+ Oobe.getInstance().changeState_(screenInfo);
+ };
+
+ // Export
+ return {
+ Oobe: Oobe
+ };
+
+});
+
+var Oobe = cr.ui.Oobe;
+
+document.addEventListener('DOMContentLoaded', cr.ui.Oobe.initialize);
« no previous file with comments | « chrome/browser/resources/chromeos/oobe.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698