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

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

Issue 7104121: Add (uneditable) display of extension keywords to the search engine manager. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Catch up with base namespace for values. Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.search_engines', function() { 5 cr.define('options.search_engines', function() {
6 const InlineEditableItemList = options.InlineEditableItemList; 6 const InlineEditableItemList = options.InlineEditableItemList;
7 const InlineEditableItem = options.InlineEditableItem; 7 const InlineEditableItem = options.InlineEditableItem;
8 const ListSelectionController = cr.ui.ListSelectionController; 8 const ListSelectionController = cr.ui.ListSelectionController;
9 9
10 /** 10 /**
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 this.urlField_.placeholder = 153 this.urlField_.placeholder =
154 localStrings.getString('searchEngineTableURLPlaceholder'); 154 localStrings.getString('searchEngineTableURLPlaceholder');
155 } 155 }
156 156
157 var fields = [ this.nameField_, this.keywordField_, this.urlField_ ]; 157 var fields = [ this.nameField_, this.keywordField_, this.urlField_ ];
158 for (var i = 0; i < fields.length; i++) { 158 for (var i = 0; i < fields.length; i++) {
159 fields[i].oninput = this.startFieldValidation_.bind(this); 159 fields[i].oninput = this.startFieldValidation_.bind(this);
160 } 160 }
161 161
162 // Listen for edit events. 162 // Listen for edit events.
163 this.addEventListener('edit', this.onEditStarted_.bind(this)); 163 if (engine['canBeEdited']) {
164 this.addEventListener('canceledit', this.onEditCancelled_.bind(this)); 164 this.addEventListener('edit', this.onEditStarted_.bind(this));
165 this.addEventListener('commitedit', this.onEditCommitted_.bind(this)); 165 this.addEventListener('canceledit', this.onEditCancelled_.bind(this));
166 this.addEventListener('commitedit', this.onEditCommitted_.bind(this));
167 } else {
168 this.editable = false;
169 }
166 }, 170 },
167 171
168 /** @inheritDoc */ 172 /** @inheritDoc */
169 get currentInputIsValid() { 173 get currentInputIsValid() {
170 return !this.waitingForValidation_ && this.currentlyValid_; 174 return !this.waitingForValidation_ && this.currentlyValid_;
171 }, 175 },
172 176
173 /** @inheritDoc */ 177 /** @inheritDoc */
174 get hasBeenEdited() { 178 get hasBeenEdited() {
175 var engine = this.searchEngine_; 179 var engine = this.searchEngine_;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 }, 307 },
304 }; 308 };
305 309
306 // Export 310 // Export
307 return { 311 return {
308 SearchEngineList: SearchEngineList 312 SearchEngineList: SearchEngineList
309 }; 313 };
310 314
311 }); 315 });
312 316
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698