Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

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

Issue 7980012: [ChromeOS] Reland - Make WebUI login use only needed resources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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) 2011 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 Login UI header bar implementation.
7 */
8
9 cr.define('login', function() {
10
11 /**
12 * Creates a header bar element.
13 * @constructor
14 * @extends {HTMLDivElement}
15 */
16 var HeaderBar = cr.ui.define('div');
17
18 HeaderBar.prototype = {
19 __proto__: HTMLDivElement.prototype,
20
21 /** @inheritDoc */
22 decorate: function() {
23 $('shutdown-button').addEventListener('click', function(e) {
24 chrome.send('shutdownSystem');
25 });
26 $('add-user-button').addEventListener('click', function(e) {
27 if (window.navigator.onLine) {
28 Oobe.showSigninUI();
29 } else {
30 $('bubble').showTextForElement($('add-user-button'),
31 localStrings.getString('addUserOfflineMessage'));
32 }
33 });
34 $('cancel-add-user-button').addEventListener('click', function(e) {
35 this.hidden = true;
36 $('add-user-button').hidden = false;
37 Oobe.showScreen({id: SCREEN_ACCOUNT_PICKER});
38 });
39 }
40 };
41
42 return {
43 HeaderBar: HeaderBar
44 };
45 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/header_bar.html ('k') | chrome/browser/resources/chromeos/login/login.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698