| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var OptionsPage = options.OptionsPage; | 6 var OptionsPage = options.OptionsPage; |
| 7 var ArrayDataModel = cr.ui.ArrayDataModel; | 7 var ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 var RepeatingButton = cr.ui.RepeatingButton; | 8 var RepeatingButton = cr.ui.RepeatingButton; |
| 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; | 9 var HotwordSearchSettingIndicator = options.HotwordSearchSettingIndicator; |
| 10 | 10 |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1023 } | 1023 } |
| 1024 }, | 1024 }, |
| 1025 | 1025 |
| 1026 /** | 1026 /** |
| 1027 * Activates the Hotword section from the System settings page. | 1027 * Activates the Hotword section from the System settings page. |
| 1028 * @param {boolean} opt_enabled Current preference state for hotwording. | 1028 * @param {boolean} opt_enabled Current preference state for hotwording. |
| 1029 * @param {string} opt_error The error message to display. | 1029 * @param {string} opt_error The error message to display. |
| 1030 * @private | 1030 * @private |
| 1031 */ | 1031 */ |
| 1032 showHotwordSection_: function(opt_enabled, opt_error) { | 1032 showHotwordSection_: function(opt_enabled, opt_error) { |
| 1033 $('voice-section-title').hidden = false; |
| 1033 $('hotword-search').hidden = false; | 1034 $('hotword-search').hidden = false; |
| 1034 $('hotword-search-setting-indicator').setError(opt_error); | 1035 $('hotword-search-setting-indicator').setError(opt_error); |
| 1035 if (opt_enabled && opt_error) | 1036 if (opt_enabled && opt_error) |
| 1036 $('hotword-search-setting-indicator').updateBasedOnError(); | 1037 $('hotword-search-setting-indicator').updateBasedOnError(); |
| 1037 }, | 1038 }, |
| 1038 | 1039 |
| 1039 /** | 1040 /** |
| 1040 * Event listener for the 'homepage is NTP' preference. Updates the label | 1041 * Event listener for the 'homepage is NTP' preference. Updates the label |
| 1041 * next to the 'Change' button. | 1042 * next to the 'Change' button. |
| 1042 * @param {Event} event The preference change event. | 1043 * @param {Event} event The preference change event. |
| (...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1887 $('consumer-management-unenroll').hidden = !isEnrolled; | 1888 $('consumer-management-unenroll').hidden = !isEnrolled; |
| 1888 ConsumerManagementOverlay.setEnrollmentStatus(isEnrolled); | 1889 ConsumerManagementOverlay.setEnrollmentStatus(isEnrolled); |
| 1889 }; | 1890 }; |
| 1890 } | 1891 } |
| 1891 | 1892 |
| 1892 // Export | 1893 // Export |
| 1893 return { | 1894 return { |
| 1894 BrowserOptions: BrowserOptions | 1895 BrowserOptions: BrowserOptions |
| 1895 }; | 1896 }; |
| 1896 }); | 1897 }); |
| OLD | NEW |