| 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 a7f80bea7e46a5262fb40b77ac939ab1f0f62c29..15d930572381e09ca25205db18ce26f845be7548 100644
|
| --- a/chrome/browser/resources/options/search_engine_manager.js
|
| +++ b/chrome/browser/resources/options/search_engine_manager.js
|
| @@ -23,19 +23,22 @@ cr.define('options', function() {
|
| __proto__: OptionsPage.prototype,
|
|
|
| /**
|
| - * List for default search engine options
|
| - * @type {boolean}
|
| + * List for default search engine options.
|
| * @private
|
| */
|
| defaultsList_: null,
|
|
|
| /**
|
| - * List for other search engine options
|
| - * @type {boolean}
|
| + * List for other search engine options.
|
| * @private
|
| */
|
| othersList_: null,
|
|
|
| + /**
|
| + * List for extension keywords.
|
| + * @private
|
| + extensionList_ : null,
|
| +
|
| /** inheritDoc */
|
| initializePage: function() {
|
| OptionsPage.prototype.initializePage.call(this);
|
| @@ -45,6 +48,9 @@ cr.define('options', function() {
|
|
|
| this.othersList_ = $('otherSearchEngineList');
|
| this.setUpList_(this.othersList_);
|
| +
|
| + this.extensionList_ = $('extensionKeywordList');
|
| + this.setUpList_(this.extensionList_);
|
| },
|
|
|
| /**
|
| @@ -62,8 +68,9 @@ cr.define('options', function() {
|
| * @private
|
| * @param {Array} defaultEngines List of possible default search engines.
|
| * @param {Array} otherEngines List of other search engines.
|
| + * @param {Array} keywords List of keywords from extensions.
|
| */
|
| - updateSearchEngineList_: function(defaultEngines, otherEngines) {
|
| + updateSearchEngineList_: function(defaultEngines, otherEngines, keywords) {
|
| this.defaultsList_.dataModel = new ArrayDataModel(defaultEngines);
|
|
|
| otherEngines = otherEngines.map(function(x) {
|
| @@ -80,13 +87,23 @@ cr.define('options', function() {
|
| 'modelIndex': '-1'
|
| });
|
| this.othersList_.dataModel = othersModel;
|
| +
|
| + if (keywords.length > 0) {
|
| + $('extensionKeywordListTitle').hidden = false;
|
| + $('extensionKeywordList').hidden = false;
|
| + $('manageExtensionLink').hidden = false;
|
| + var extensionsModel = new ArrayDataModel(keywords);
|
| + this.extensionList_.dataModel = extensionsModel;
|
| + }
|
| },
|
| };
|
|
|
| SearchEngineManager.updateSearchEngineList = function(defaultEngines,
|
| - otherEngines) {
|
| + otherEngines,
|
| + keywords) {
|
| SearchEngineManager.getInstance().updateSearchEngineList_(defaultEngines,
|
| - otherEngines);
|
| + otherEngines,
|
| + keywords);
|
| };
|
|
|
| SearchEngineManager.validityCheckCallback = function(validity, modelIndex) {
|
|
|