| 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 | 9 |
| 10 // | 10 // |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 'change', this.onHomePageSelectChange_.bind(this)); | 100 'change', this.onHomePageSelectChange_.bind(this)); |
| 101 | 101 |
| 102 ['browser.show_home_button', | 102 ['browser.show_home_button', |
| 103 'homepage', | 103 'homepage', |
| 104 'homepage_is_newtabpage'].forEach(function(pref) { | 104 'homepage_is_newtabpage'].forEach(function(pref) { |
| 105 Preferences.getInstance().addEventListener( | 105 Preferences.getInstance().addEventListener( |
| 106 pref, | 106 pref, |
| 107 self.onHomePagePrefChanged_.bind(self)); | 107 self.onHomePagePrefChanged_.bind(self)); |
| 108 }); | 108 }); |
| 109 | 109 |
| 110 if ($('set-wallpaper')) { |
| 111 $('set-wallpaper').onclick = function(event) { |
| 112 OptionsPage.navigateToPage('setWallpaper'); |
| 113 }; |
| 114 } |
| 115 |
| 110 $('themes-gallery').onclick = function(event) { | 116 $('themes-gallery').onclick = function(event) { |
| 111 window.open(localStrings.getString('themesGalleryURL')); | 117 window.open(localStrings.getString('themesGalleryURL')); |
| 112 }; | 118 }; |
| 113 $('themes-reset').onclick = function(event) { | 119 $('themes-reset').onclick = function(event) { |
| 114 chrome.send('themesReset'); | 120 chrome.send('themesReset'); |
| 115 }; | 121 }; |
| 116 | 122 |
| 117 // Device section (ChromeOS only). | 123 // Device section (ChromeOS only). |
| 118 if (cr.isChromeOS) { | 124 if (cr.isChromeOS) { |
| 119 $('keyboard-settings-button').onclick = function(evt) { | 125 $('keyboard-settings-button').onclick = function(evt) { |
| (...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 BrowserOptions.getLoggedInUsername = function() { | 1218 BrowserOptions.getLoggedInUsername = function() { |
| 1213 return BrowserOptions.getInstance().username_; | 1219 return BrowserOptions.getInstance().username_; |
| 1214 }; | 1220 }; |
| 1215 } | 1221 } |
| 1216 | 1222 |
| 1217 // Export | 1223 // Export |
| 1218 return { | 1224 return { |
| 1219 BrowserOptions: BrowserOptions | 1225 BrowserOptions: BrowserOptions |
| 1220 }; | 1226 }; |
| 1221 }); | 1227 }); |
| OLD | NEW |