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

Unified Diff: chrome/browser/resources/settings/search_page/search_page.js

Issue 2522773002: MD Settings: extension-controlled indicators for default search engine (Closed)
Patch Set: test Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/search_page/search_page.js
diff --git a/chrome/browser/resources/settings/search_page/search_page.js b/chrome/browser/resources/settings/search_page/search_page.js
index 4c70a30433cf313549cede562266954b265e04a7..328df5bd0351d400cb89a6eada3e760923e42281 100644
--- a/chrome/browser/resources/settings/search_page/search_page.js
+++ b/chrome/browser/resources/settings/search_page/search_page.js
@@ -10,6 +10,8 @@ Polymer({
is: 'settings-search-page',
properties: {
+ prefs: Object,
+
/**
* List of default search engines available.
* @private {!Array<!SearchEngine>}
@@ -18,11 +20,11 @@ Polymer({
type: Array,
value: function() { return []; }
},
-
- /** @private {!settings.SearchEnginesBrowserProxy} */
- browserProxy_: Object,
},
+ /** @private {?settings.SearchEnginesBrowserProxy} */
+ browserProxy_: null,
+
/** @override */
created: function() {
this.browserProxy_ = settings.SearchEnginesBrowserProxyImpl.getInstance();
@@ -38,14 +40,19 @@ Polymer({
},
/** @private */
- onManageSearchEnginesTap_: function() {
- settings.navigateTo(settings.Route.SEARCH_ENGINES);
- },
-
- /** @private */
- onChange_: function(e) {
+ onChange_: function() {
var select = /** @type {!HTMLSelectElement} */ (this.$$('select'));
var searchEngine = this.searchEngines_[select.selectedIndex];
this.browserProxy_.setDefaultSearchEngine(searchEngine.modelIndex);
},
+
+ /** @private */
+ onDisableExtension_: function() {
+ this.fire('refresh-pref', 'default_search_provider.enabled');
+ },
+
+ /** @private */
+ onManageSearchEnginesTap_: function() {
+ settings.navigateTo(settings.Route.SEARCH_ENGINES);
+ },
});
« no previous file with comments | « chrome/browser/resources/settings/search_page/search_page.html ('k') | chrome/test/data/webui/settings/search_page_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698