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

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

Issue 12548008: Really fix crash when dragging and dropping in chrome://settings/startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Snip Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 */ var ArrayDataModel = cr.ui.ArrayDataModel; 6 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel;
7 /** @const */ var OptionsPage = options.OptionsPage; 7 /** @const */ var OptionsPage = options.OptionsPage;
8 /** @const */ var SettingsDialog = options.SettingsDialog; 8 /** @const */ var SettingsDialog = options.SettingsDialog;
9 9
10 /** 10 /**
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 }, 118 },
119 119
120 /** 120 /**
121 * Updates the startup pages list with the given entries. 121 * Updates the startup pages list with the given entries.
122 * @param {Array} pages List of startup pages. 122 * @param {Array} pages List of startup pages.
123 * @private 123 * @private
124 */ 124 */
125 updateStartupPages_: function(pages) { 125 updateStartupPages_: function(pages) {
126 var model = new ArrayDataModel(pages); 126 var model = new ArrayDataModel(pages);
127 // Add a "new page" row. 127 // Add a "new page" row.
128 model.push({ 128 model.push({
Dan Beam 2013/03/09 00:22:04 nit: make 1 line, IMO model.push({modelIndex: -
dcheng 2013/03/09 01:06:22 Done.
129 'modelIndex': '-1' 129 'modelIndex': -1
130 }); 130 });
131 $('startupPagesList').dataModel = model; 131 $('startupPagesList').dataModel = model;
132 }, 132 },
133 133
134 /** 134 /**
135 * Sends an asynchronous request for new autocompletion suggestions for the 135 * Sends an asynchronous request for new autocompletion suggestions for the
136 * the given query. When new suggestions are available, the C++ handler will 136 * the given query. When new suggestions are available, the C++ handler will
137 * call updateAutocompleteSuggestions_. 137 * call updateAutocompleteSuggestions_.
138 * @param {string} query List of autocomplete suggestions. 138 * @param {string} query List of autocomplete suggestions.
139 * @private 139 * @private
(...skipping 28 matching lines...) Expand all
168 var instance = StartupOverlay.getInstance(); 168 var instance = StartupOverlay.getInstance();
169 return instance[name + '_'].apply(instance, arguments); 169 return instance[name + '_'].apply(instance, arguments);
170 }; 170 };
171 }); 171 });
172 172
173 // Export 173 // Export
174 return { 174 return {
175 StartupOverlay: StartupOverlay 175 StartupOverlay: StartupOverlay
176 }; 176 };
177 }); 177 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698