OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; | 8 const ListSingleSelectionModel = cr.ui.ListSingleSelectionModel; |
9 | 9 |
10 /** | 10 /** |
(...skipping 16 matching lines...) Loading... |
27 * Initializes the page. | 27 * Initializes the page. |
28 */ | 28 */ |
29 initializePage: function() { | 29 initializePage: function() { |
30 OptionsPage.prototype.initializePage.call(this); | 30 OptionsPage.prototype.initializePage.call(this); |
31 | 31 |
32 var self = this; | 32 var self = this; |
33 var addForm = $('addStartupPageForm'); | 33 var addForm = $('addStartupPageForm'); |
34 addForm.onreset = this.dismissOverlay_.bind(this); | 34 addForm.onreset = this.dismissOverlay_.bind(this); |
35 addForm.onsubmit = function(e) { | 35 addForm.onsubmit = function(e) { |
36 var urlField = $('addStartupPageURL'); | 36 var urlField = $('addStartupPageURL'); |
37 BrowserOptions.addStartupPage(urlField.value); | 37 StartupPageManager.addStartupPage(urlField.value); |
38 | 38 |
39 self.dismissOverlay_(); | 39 self.dismissOverlay_(); |
40 return false; | 40 return false; |
41 }; | 41 }; |
42 $('addStartupPageURL').oninput = this.updateAddButtonState_.bind(this); | 42 $('addStartupPageURL').oninput = this.updateAddButtonState_.bind(this); |
43 $('addStartupPageURL').onkeydown = function(e) { | 43 $('addStartupPageURL').onkeydown = function(e) { |
44 if (e.keyCode == 27) // Esc | 44 if (e.keyCode == 27) // Esc |
45 $('addStartupPageForm').reset(); | 45 $('addStartupPageForm').reset(); |
46 }; | 46 }; |
47 | 47 |
(...skipping 71 matching lines...) Loading... |
119 AddStartupPageOverlay.setInputFieldValue = function(url) { | 119 AddStartupPageOverlay.setInputFieldValue = function(url) { |
120 AddStartupPageOverlay.getInstance().setInputFieldValue_(url); | 120 AddStartupPageOverlay.getInstance().setInputFieldValue_(url); |
121 }; | 121 }; |
122 | 122 |
123 // Export | 123 // Export |
124 return { | 124 return { |
125 AddStartupPageOverlay: AddStartupPageOverlay | 125 AddStartupPageOverlay: AddStartupPageOverlay |
126 }; | 126 }; |
127 | 127 |
128 }); | 128 }); |
OLD | NEW |