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

Side by Side Diff: chrome/browser/resources/settings/search_engines_page/search_engine_adder.js

Issue 1128313004: Convert search_engines_page (and search_engine-adder) to be compatible with Polymer 0.8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jlklein comments. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 'cr-search-engine-adder' is a component for adding a new search 6 * @fileoverview 'cr-search-engine-adder' is a component for adding a new search
7 * engine. 7 * engine.
8 * 8 *
9 * @group Chrome Settings Elements 9 * @group Chrome Settings Elements
10 * @element cr-settings-search-engine-adder 10 * @element cr-settings-search-engine-adder
11 */ 11 */
12 Polymer('cr-search-engine-adder', { 12 Polymer({
13 is: 'cr-search-engine-adder',
14
13 /** @private */ 15 /** @private */
14 add_: function() { 16 add_: function() {
15 if (!this.$.domainField.isInvalid && 17 if (!this.$.domainField.isInvalid &&
16 !this.$.keywordField.isInvalid && 18 !this.$.keywordField.isInvalid &&
17 !this.$.queryURLField.isInvalid) { 19 !this.$.queryURLField.isInvalid) {
18 chrome.searchEnginesPrivate.addOtherSearchEngine( 20 chrome.searchEnginesPrivate.addOtherSearchEngine(
19 /* name */ this.$.domainField.value, 21 /* name */ this.$.domainField.value,
20 /* keyword */ this.$.keywordField.value, 22 /* keyword */ this.$.keywordField.value,
21 /* url */ this.$.queryURLField.value); 23 /* url */ this.$.queryURLField.value);
22 this.$.domainField.value = ''; 24 this.$.domainField.value = '';
23 this.$.keywordField.value = ''; 25 this.$.keywordField.value = '';
24 this.$.queryURLField.value = ''; 26 this.$.queryURLField.value = '';
25 } 27 }
26 }, 28 },
27 }); 29 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698