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 // TODO(kochi): Generalize the notification as a component and put it | 5 // TODO(kochi): Generalize the notification as a component and put it |
6 // in js/cr/ui/notification.js . | 6 // in js/cr/ui/notification.js . |
7 | 7 |
8 cr.define('options', function() { | 8 cr.define('options', function() { |
9 /** @const */ var Page = cr.ui.pageManager.Page; | 9 /** @const */ var Page = cr.ui.pageManager.Page; |
10 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 10 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 chrome.send('uiLanguageRestart'); | 269 chrome.send('uiLanguageRestart'); |
270 }; | 270 }; |
271 } | 271 } |
272 | 272 |
273 $('language-confirm').onclick = | 273 $('language-confirm').onclick = |
274 PageManager.closeOverlay.bind(PageManager); | 274 PageManager.closeOverlay.bind(PageManager); |
275 | 275 |
276 // Public session users cannot change the locale. | 276 // Public session users cannot change the locale. |
277 if (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount()) | 277 if (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount()) |
278 $('language-options-ui-language-section').hidden = true; | 278 $('language-options-ui-language-section').hidden = true; |
279 PageManager.closeOverlay.bind(PageManager); | |
280 }, | 279 }, |
281 | 280 |
282 /** | 281 /** |
283 * Initializes the input method list. | 282 * Initializes the input method list. |
284 */ | 283 */ |
285 initializeInputMethodList_: function() { | 284 initializeInputMethodList_: function() { |
286 var inputMethodList = $('language-options-input-method-list'); | 285 var inputMethodList = $('language-options-input-method-list'); |
287 var inputMethodPrototype = $('language-options-input-method-template'); | 286 var inputMethodPrototype = $('language-options-input-method-template'); |
288 | 287 |
289 // Add all input methods, but make all of them invisible here. We'll | 288 // Add all input methods, but make all of them invisible here. We'll |
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1452 | 1451 |
1453 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) { | 1452 LanguageOptions.onDictionaryDownloadFailure = function(languageCode) { |
1454 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode); | 1453 LanguageOptions.getInstance().onDictionaryDownloadFailure_(languageCode); |
1455 }; | 1454 }; |
1456 | 1455 |
1457 // Export | 1456 // Export |
1458 return { | 1457 return { |
1459 LanguageOptions: LanguageOptions | 1458 LanguageOptions: LanguageOptions |
1460 }; | 1459 }; |
1461 }); | 1460 }); |
OLD | NEW |