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
3 // found in the LICENSE file.
6 * @fileoverview 'cr-search-engine-adder' is a component for adding a new search
9 * @group Chrome Settings Elements
10 * @element cr-settings-search-engine-adder
13 is: 'cr-search-engine-adder',
17 if (!this.$.domainField.isInvalid &&
18 !this.$.keywordField.isInvalid &&
19 !this.$.queryURLField.isInvalid) {
20 chrome.searchEnginesPrivate.addOtherSearchEngine(
21 /* name */ this.$.domainField.value,
22 /* keyword */ this.$.keywordField.value,
23 /* url */ this.$.queryURLField.value);
24 this.$.domainField.value = '';
25 this.$.keywordField.value = '';
26 this.$.queryURLField.value = '';