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',
33 * Whether the page is a subpage.
46 value: 'search_engines',
51 * Title for the page header and navigation menu.
55 value: loadTimeData.getString('searchEnginesPageTitle'),
60 * Name of the 'core-icon' to be shown in the settings-page-header.
68 /** @type {!Array<!SearchEngine>} */
71 value: function() { return []; }
74 /** @type {!Array<!SearchEngine>} */
77 value: function() { return []; }
83 chrome.searchEnginesPrivate.onSearchEnginesChanged.addListener(
84 this.enginesChanged_.bind(this));
85 this.enginesChanged_();
89 enginesChanged_: function() {
90 chrome.searchEnginesPrivate.getSearchEngines(function(engines) {
91 this.defaultEngines = engines.filter(function(engine) {
93 chrome.searchEnginesPrivate.SearchEngineType.DEFAULT;
96 this.otherEngines = engines.filter(function(engine) {
98 chrome.searchEnginesPrivate.SearchEngineType.OTHER;