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-settings-search-engines-page' is the settings page
7 * containing search engines settings.
11 * <core-animated-pages>
12 * <cr-settings-search-engines-page prefs="{{prefs}}">
13 * </cr-settings-search-engines-page>
15 * </core-animated-pages>
17 * @group Chrome Settings Elements
18 * @element cr-settings-search-engines-page
21 is: 'cr-settings-search-engines-page',
24 /** @type {!Array<!SearchEngine>} */
27 value: function() { return []; }
30 /** @type {!Array<!SearchEngine>} */
33 value: function() { return []; }
39 chrome.searchEnginesPrivate.onSearchEnginesChanged.addListener(
40 this.enginesChanged_.bind(this));
41 this.enginesChanged_();
45 enginesChanged_: function() {
46 chrome.searchEnginesPrivate.getSearchEngines(function(engines) {
47 this.defaultEngines = engines.filter(function(engine) {
49 chrome.searchEnginesPrivate.SearchEngineType.DEFAULT;
52 this.otherEngines = engines.filter(function(engine) {
54 chrome.searchEnginesPrivate.SearchEngineType.OTHER;