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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
188 this.username_ = localStrings.getString('username'); | 188 this.username_ = localStrings.getString('username'); |
189 | 189 |
190 this.updateAccountPicture_(); | 190 this.updateAccountPicture_(); |
191 | 191 |
192 if (cr.commandLine && cr.commandLine.options['--bwsi']) { | 192 if (cr.commandLine && cr.commandLine.options['--bwsi']) { |
193 // Disable the screen lock checkbox in guest mode. | 193 // Disable the screen lock checkbox in guest mode. |
194 $('enable-screen-lock').disabled = true; | 194 $('enable-screen-lock').disabled = true; |
195 | 195 |
196 // Hide the startup section in Guest mode. | 196 // Hide the startup section in Guest mode. |
197 $('startup-section').hidden = true; | 197 $('startup-section').hidden = true; |
198 } else { | 198 } else if (localStrings.getString('current_user_is_ephemeral') != |
199 'true') { | |
200 // Enable picture changing if the user is neither a guest nor | |
201 // ephemeral. | |
Ivan Korotkov
2012/03/01 20:16:30
#change-picture-caption should be made invisible a
use bartfab instead
2012/03/05 18:07:32
Done.
| |
199 $('account-picture-wrapper').onclick = function(event) { | 202 $('account-picture-wrapper').onclick = function(event) { |
200 OptionsPage.navigateToPage('changePicture'); | 203 OptionsPage.navigateToPage('changePicture'); |
201 }; | 204 }; |
202 } | 205 } |
203 | 206 |
204 $('manage-accounts-button').onclick = function(event) { | 207 $('manage-accounts-button').onclick = function(event) { |
205 OptionsPage.navigateToPage('accounts'); | 208 OptionsPage.navigateToPage('accounts'); |
206 chrome.send('coreOptionsUserMetricsAction', | 209 chrome.send('coreOptionsUserMetricsAction', |
207 ['Options_ManageAccounts']); | 210 ['Options_ManageAccounts']); |
208 }; | 211 }; |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
764 BrowserOptions.getLoggedInUsername = function() { | 767 BrowserOptions.getLoggedInUsername = function() { |
765 return BrowserOptions.getInstance().username_; | 768 return BrowserOptions.getInstance().username_; |
766 }; | 769 }; |
767 } | 770 } |
768 | 771 |
769 // Export | 772 // Export |
770 return { | 773 return { |
771 BrowserOptions: BrowserOptions | 774 BrowserOptions: BrowserOptions |
772 }; | 775 }; |
773 }); | 776 }); |
OLD | NEW |