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

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

Issue 6352004: DOMUI Prefs: Add inline buttons for setting the default search engine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/search_engine_manager.js
diff --git a/chrome/browser/resources/options/search_engine_manager.js b/chrome/browser/resources/options/search_engine_manager.js
index 9a99f574ead3c52fbb316ded650ddb5066d40586..d0b50f8abdfa06003d3776ae45a977cceca07551 100644
--- a/chrome/browser/resources/options/search_engine_manager.js
+++ b/chrome/browser/resources/options/search_engine_manager.js
@@ -32,24 +32,6 @@ cr.define('options', function() {
var selectionModel = new ListSingleSelectionModel;
this.list_.selectionModel = selectionModel;
this.list_.autoExpands = true;
-
- selectionModel.addEventListener('change',
- this.selectionChanged_.bind(this));
-
- var self = this;
- // This is a temporary hack to allow the "Make Default" button to
- // continue working despite the new list behavior of removing selection
- // on focus loss.
- // Once drag-and-drop is supported, so items can be moved into the default
- // section, this button will go away entirely.
- $('makeDefaultSearchEngineButton').onmousedown = function(event) {
- self.pendingDefaultEngine_ = self.list_.selectedItem;
- };
- $('makeDefaultSearchEngineButton').onclick = function(event) {
- chrome.send('managerSetDefaultSearchEngine',
- [self.pendingDefaultEngine_['modelIndex']]);
- self.pendingDefaultEngine_ = null;
- };
},
/**
@@ -64,17 +46,6 @@ cr.define('options', function() {
});
this.list_.dataModel = model;
},
-
- /**
- * Callback from the selection model when the selection changes.
- * @private
- * @param {!cr.Event} e Event with change info.
- */
- selectionChanged_: function(e) {
- var engine = this.list_.selectedItem || this.pendingDefaultEngine_;
- $('makeDefaultSearchEngineButton').disabled =
- !(engine && engine['canBeDefault']);
- },
};
SearchEngineManager.updateSearchEngineList = function(engineList) {

Powered by Google App Engine
This is Rietveld 408576698