| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 'change', this.onHomePageSelectChange_.bind(this)); | 104 'change', this.onHomePageSelectChange_.bind(this)); |
| 105 | 105 |
| 106 ['browser.show_home_button', | 106 ['browser.show_home_button', |
| 107 'homepage', | 107 'homepage', |
| 108 'homepage_is_newtabpage'].forEach(function(pref) { | 108 'homepage_is_newtabpage'].forEach(function(pref) { |
| 109 Preferences.getInstance().addEventListener( | 109 Preferences.getInstance().addEventListener( |
| 110 pref, | 110 pref, |
| 111 self.onHomePagePrefChanged_.bind(self)); | 111 self.onHomePagePrefChanged_.bind(self)); |
| 112 }); | 112 }); |
| 113 | 113 |
| 114 if ($('set-wallpaper')) { |
| 115 $('set-wallpaper').onclick = function(event) { |
| 116 OptionsPage.navigateToPage('setWallpaper'); |
| 117 }; |
| 118 } |
| 119 |
| 114 $('themes-gallery').onclick = function(event) { | 120 $('themes-gallery').onclick = function(event) { |
| 115 window.open(localStrings.getString('themesGalleryURL')); | 121 window.open(localStrings.getString('themesGalleryURL')); |
| 116 }; | 122 }; |
| 117 $('themes-reset').onclick = function(event) { | 123 $('themes-reset').onclick = function(event) { |
| 118 chrome.send('themesReset'); | 124 chrome.send('themesReset'); |
| 119 }; | 125 }; |
| 120 | 126 |
| 121 // Device section (ChromeOS only). | 127 // Device section (ChromeOS only). |
| 122 if (cr.isChromeOS) { | 128 if (cr.isChromeOS) { |
| 123 $('keyboard-settings-button').onclick = function(evt) { | 129 $('keyboard-settings-button').onclick = function(evt) { |
| (...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1234 BrowserOptions.getLoggedInUsername = function() { | 1240 BrowserOptions.getLoggedInUsername = function() { |
| 1235 return BrowserOptions.getInstance().username_; | 1241 return BrowserOptions.getInstance().username_; |
| 1236 }; | 1242 }; |
| 1237 } | 1243 } |
| 1238 | 1244 |
| 1239 // Export | 1245 // Export |
| 1240 return { | 1246 return { |
| 1241 BrowserOptions: BrowserOptions | 1247 BrowserOptions: BrowserOptions |
| 1242 }; | 1248 }; |
| 1243 }); | 1249 }); |
| OLD | NEW |