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 OptionsPage = options.OptionsPage; | 9 /** @const */ var OptionsPage = options.OptionsPage; |
10 /** @const */ var LanguageList = options.LanguageList; | 10 /** @const */ var LanguageList = options.LanguageList; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 } | 246 } |
247 | 247 |
248 if (cr.isChromeOS) { | 248 if (cr.isChromeOS) { |
249 $('language-options-ui-restart-button').onclick = function() { | 249 $('language-options-ui-restart-button').onclick = function() { |
250 chrome.send('uiLanguageRestart'); | 250 chrome.send('uiLanguageRestart'); |
251 }; | 251 }; |
252 } | 252 } |
253 | 253 |
254 $('language-confirm').onclick = | 254 $('language-confirm').onclick = |
255 OptionsPage.closeOverlay.bind(OptionsPage); | 255 OptionsPage.closeOverlay.bind(OptionsPage); |
| 256 |
| 257 // Public session users cannot change the locale. |
| 258 if (cr.isChromeOS && UIAccountTweaks.loggedInAsPublicAccount()) |
| 259 $('language-options-ui-language-section').hidden = true; |
256 }, | 260 }, |
257 | 261 |
258 /** | 262 /** |
259 * Initializes the input method list. | 263 * Initializes the input method list. |
260 */ | 264 */ |
261 initializeInputMethodList_: function() { | 265 initializeInputMethodList_: function() { |
262 var inputMethodList = $('language-options-input-method-list'); | 266 var inputMethodList = $('language-options-input-method-list'); |
263 var inputMethodPrototype = $('language-options-input-method-template'); | 267 var inputMethodPrototype = $('language-options-input-method-template'); |
264 | 268 |
265 // Add all input methods, but make all of them invisible here. We'll | 269 // Add all input methods, but make all of them invisible here. We'll |
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 | 1360 |
1357 LanguageOptions.onComponentManagerInitialized = function(componentImes) { | 1361 LanguageOptions.onComponentManagerInitialized = function(componentImes) { |
1358 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); | 1362 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); |
1359 }; | 1363 }; |
1360 | 1364 |
1361 // Export | 1365 // Export |
1362 return { | 1366 return { |
1363 LanguageOptions: LanguageOptions | 1367 LanguageOptions: LanguageOptions |
1364 }; | 1368 }; |
1365 }); | 1369 }); |
OLD | NEW |