| OLD | NEW |
| 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 | 6 * @fileoverview |
| 7 * 'settings-search-page' is the settings page containing search settings. | 7 * 'settings-search-page' is the settings page containing search settings. |
| 8 */ | 8 */ |
| 9 Polymer({ | 9 Polymer({ |
| 10 is: 'settings-search-page', | 10 is: 'settings-search-page', |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 // Hotword (OK Google) listener | 65 // Hotword (OK Google) listener |
| 66 cr.addWebUIListener( | 66 cr.addWebUIListener( |
| 67 'hotword-info-update', this.hotwordInfoUpdate_.bind(this)); | 67 'hotword-info-update', this.hotwordInfoUpdate_.bind(this)); |
| 68 | 68 |
| 69 // Google Now cards in the launcher | 69 // Google Now cards in the launcher |
| 70 cr.addWebUIListener( | 70 cr.addWebUIListener( |
| 71 'google-now-availability-changed', | 71 'google-now-availability-changed', |
| 72 this.googleNowAvailabilityUpdate_.bind(this)); | 72 this.googleNowAvailabilityUpdate_.bind(this)); |
| 73 this.browserProxy_.getGoogleNowAvailability().then(function(available) { | 73 this.browserProxy_.getGoogleNowAvailability().then(function(available) { |
| 74 this.googleNowAvailabilityUpdate_(available); | 74 this.googleNowAvailabilityUpdate_(available); |
| 75 }.bind(this)); | 75 }.bind(this)); |
| 76 | 76 |
| 77 this.focusConfig_ = new Map(); | 77 this.focusConfig_ = new Map(); |
| 78 this.focusConfig_.set( | 78 this.focusConfig_.set( |
| 79 settings.Route.SEARCH_ENGINES.path, '#subpage-trigger .subpage-arrow'); | 79 settings.Route.SEARCH_ENGINES.path, '#subpage-trigger .subpage-arrow'); |
| 80 }, | 80 }, |
| 81 | 81 |
| 82 /** @private */ | 82 /** @private */ |
| 83 onChange_: function() { | 83 onChange_: function() { |
| 84 var select = /** @type {!HTMLSelectElement} */ (this.$$('select')); | 84 var select = /** @type {!HTMLSelectElement} */ (this.$$('select')); |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 | 185 |
| 186 /** | 186 /** |
| 187 * @param {!chrome.settingsPrivate.PrefObject} pref | 187 * @param {!chrome.settingsPrivate.PrefObject} pref |
| 188 * @return {boolean} | 188 * @return {boolean} |
| 189 * @private | 189 * @private |
| 190 */ | 190 */ |
| 191 isDefaultSearchEngineEnforced_: function(pref) { | 191 isDefaultSearchEngineEnforced_: function(pref) { |
| 192 return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED; | 192 return pref.enforcement == chrome.settingsPrivate.Enforcement.ENFORCED; |
| 193 }, | 193 }, |
| 194 }); | 194 }); |
| OLD | NEW |