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

Unified Diff: chrome/browser/resources/options/browser_options_startup_page_list.js

Issue 5685003: DOMUI Prefs: Add a deletable item list type, and use it for startup pages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits fixed Created 10 years 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
Index: chrome/browser/resources/options/browser_options_startup_page_list.js
diff --git a/chrome/browser/resources/options/browser_options_startup_page_list.js b/chrome/browser/resources/options/browser_options_startup_page_list.js
index 85afdc9f7dc85ce676db257324e2cdb3c3aa88ca..f63aa8ba2695f54184fdcbf3a7d8d69e5594bb2e 100644
--- a/chrome/browser/resources/options/browser_options_startup_page_list.js
+++ b/chrome/browser/resources/options/browser_options_startup_page_list.js
@@ -3,7 +3,7 @@
// found in the LICENSE file.
cr.define('options.browser_options', function() {
- const List = cr.ui.List;
+ const DeletableItemList = options.DeletableItemList;
const ListItem = cr.ui.ListItem;
/**
@@ -50,12 +50,17 @@ cr.define('options.browser_options', function() {
var StartupPageList = cr.ui.define('list');
StartupPageList.prototype = {
- __proto__: List.prototype,
+ __proto__: DeletableItemList.prototype,
/** @inheritDoc */
- createItem: function(pageInfo) {
+ createItemContents: function(pageInfo) {
return new StartupPageListItem(pageInfo);
},
+
+ /** @inheritDoc */
+ deleteItemAtIndex: function(index) {
+ chrome.send('removeStartupPages', [String(index)]);
+ },
};
return {
« no previous file with comments | « chrome/browser/resources/options/browser_options.js ('k') | chrome/browser/resources/options/deletable_item_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698