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

Side by Side Diff: chrome/browser/resources/options/supervised_user_create_confirm.js

Issue 410293004: Split OptionsPage into Page and PageManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ugh just no Created 6 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var Page = cr.ui.pageManager.Page;
7 var PageManager = cr.ui.pageManager.PageManager;
7 8
8 /** 9 /**
9 * SupervisedUserCreateConfirm class. 10 * SupervisedUserCreateConfirm class.
10 * Encapsulated handling of the confirmation overlay page when creating a 11 * Encapsulated handling of the confirmation overlay page when creating a
11 * supervised user. 12 * supervised user.
12 * @constructor 13 * @constructor
13 * @class 14 * @class
14 */ 15 */
15 function SupervisedUserCreateConfirmOverlay() { 16 function SupervisedUserCreateConfirmOverlay() {
16 OptionsPage.call(this, 'supervisedUserCreateConfirm', 17 Page.call(this, 'supervisedUserCreateConfirm',
17 '', // The title will be based on the new profile name. 18 '', // The title will be based on the new profile name.
18 'supervised-user-created'); 19 'supervised-user-created');
19 }; 20 };
20 21
21 cr.addSingletonGetter(SupervisedUserCreateConfirmOverlay); 22 cr.addSingletonGetter(SupervisedUserCreateConfirmOverlay);
22 23
23 SupervisedUserCreateConfirmOverlay.prototype = { 24 SupervisedUserCreateConfirmOverlay.prototype = {
24 // Inherit from OptionsPage. 25 // Inherit from Page.
25 __proto__: OptionsPage.prototype, 26 __proto__: Page.prototype,
26 27
27 // Info about the newly created profile. 28 // Info about the newly created profile.
28 profileInfo_: null, 29 profileInfo_: null,
29 30
30 /** @override */ 31 /** @override */
31 initializePage: function() { 32 initializePage: function() {
32 OptionsPage.prototype.initializePage.call(this); 33 Page.prototype.initializePage.call(this);
33 34
34 $('supervised-user-created-done').onclick = function(event) { 35 $('supervised-user-created-done').onclick = function(event) {
35 OptionsPage.closeOverlay(); 36 PageManager.closeOverlay();
36 }; 37 };
37 38
38 var self = this; 39 var self = this;
39 40
40 $('supervised-user-created-switch').onclick = function(event) { 41 $('supervised-user-created-switch').onclick = function(event) {
41 OptionsPage.closeOverlay(); 42 PageManager.closeOverlay();
42 chrome.send('switchToProfile', [self.profileInfo_.filePath]); 43 chrome.send('switchToProfile', [self.profileInfo_.filePath]);
43 }; 44 };
44 }, 45 },
45 46
46 /** @override */ 47 /** @override */
47 didShowPage: function() { 48 didShowPage: function() {
48 $('supervised-user-created-switch').focus(); 49 $('supervised-user-created-switch').focus();
49 }, 50 },
50 51
51 /** 52 /**
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 var instance = SupervisedUserCreateConfirmOverlay.getInstance(); 95 var instance = SupervisedUserCreateConfirmOverlay.getInstance();
95 return instance[name + '_'].apply(instance, arguments); 96 return instance[name + '_'].apply(instance, arguments);
96 }; 97 };
97 }); 98 });
98 99
99 // Export 100 // Export
100 return { 101 return {
101 SupervisedUserCreateConfirmOverlay: SupervisedUserCreateConfirmOverlay, 102 SupervisedUserCreateConfirmOverlay: SupervisedUserCreateConfirmOverlay,
102 }; 103 };
103 }); 104 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/startup_overlay.js ('k') | chrome/browser/resources/options/supervised_user_import.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698