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

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

Issue 15805002: Modify extension omnibox keywords to be user-configurable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test updates Created 7 years, 7 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_engine_list.js
diff --git a/chrome/browser/resources/options/search_engine_manager_engine_list.js b/chrome/browser/resources/options/search_engine_manager_engine_list.js
index 89695874b853624e4749140063058f065e42d069..bbea9b0d19910cad510b3e86e400a1f4d84a9974 100644
--- a/chrome/browser/resources/options/search_engine_manager_engine_list.js
+++ b/chrome/browser/resources/options/search_engine_manager_engine_list.js
@@ -116,26 +116,31 @@ cr.define('options.search_engines', function() {
// And the URL column.
var urlEl = this.createEditableTextCell(engine.url);
- var urlWithButtonEl = this.ownerDocument.createElement('div');
- urlWithButtonEl.appendChild(urlEl);
- urlWithButtonEl.className = 'url-column';
- urlWithButtonEl.classList.add('weakrtl');
- this.contentElement.appendChild(urlWithButtonEl);
- // Add the Make Default button. Temporary until drag-and-drop re-ordering
- // is implemented. When this is removed, remove the extra div above.
- if (engine.canBeDefault) {
- var makeDefaultButtonEl = this.ownerDocument.createElement('button');
- makeDefaultButtonEl.className = 'custom-appearance list-inline-button';
- makeDefaultButtonEl.textContent =
- loadTimeData.getString('makeDefaultSearchEngineButton');
- makeDefaultButtonEl.onclick = function(e) {
- chrome.send('managerSetDefaultSearchEngine', [engine.modelIndex]);
- };
- // Don't select the row when clicking the button.
- makeDefaultButtonEl.onmousedown = function(e) {
- e.stopPropagation();
- };
- urlWithButtonEl.appendChild(makeDefaultButtonEl);
+ // Extensions should not display a URL column.
+ if (!engine.isExtension) {
+ var urlWithButtonEl = this.ownerDocument.createElement('div');
+ urlWithButtonEl.appendChild(urlEl);
+ urlWithButtonEl.className = 'url-column';
+ urlWithButtonEl.classList.add('weakrtl');
+ this.contentElement.appendChild(urlWithButtonEl);
+ // Add the Make Default button. Temporary until drag-and-drop
+ // re-ordering is implemented. When this is removed, remove the extra
+ // div above.
+ if (engine.canBeDefault) {
+ var makeDefaultButtonEl = this.ownerDocument.createElement('button');
+ makeDefaultButtonEl.className =
+ 'custom-appearance list-inline-button';
+ makeDefaultButtonEl.textContent =
+ loadTimeData.getString('makeDefaultSearchEngineButton');
+ makeDefaultButtonEl.onclick = function(e) {
+ chrome.send('managerSetDefaultSearchEngine', [engine.modelIndex]);
+ };
+ // Don't select the row when clicking the button.
+ makeDefaultButtonEl.onmousedown = function(e) {
+ e.stopPropagation();
+ };
+ urlWithButtonEl.appendChild(makeDefaultButtonEl);
+ }
}
// Do final adjustment to the input fields.
@@ -148,6 +153,9 @@ cr.define('options.search_engines', function() {
if (engine.urlLocked)
this.urlField_.disabled = true;
+ if (engine.isExtension)
+ this.nameField_.disabled = true;
+
if (this.isPlaceholder) {
this.nameField_.placeholder =
loadTimeData.getString('searchEngineTableNamePlaceholder');

Powered by Google App Engine
This is Rietveld 408576698