Chromium Code Reviews| 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 const OptionsPage = options.OptionsPage; | 6 const OptionsPage = options.OptionsPage; |
| 7 const ArrayDataModel = cr.ui.ArrayDataModel; | 7 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 8 const RepeatingButton = cr.ui.RepeatingButton; | 8 const RepeatingButton = cr.ui.RepeatingButton; |
| 9 | 9 |
| 10 // | 10 // |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 343 }, | 343 }, |
| 344 | 344 |
| 345 /** | 345 /** |
| 346 * Called to set the Instant field trial status. | 346 * Called to set the Instant field trial status. |
| 347 * @param {boolean} enabled If true, the experiment is enabled. | 347 * @param {boolean} enabled If true, the experiment is enabled. |
| 348 * @private | 348 * @private |
| 349 */ | 349 */ |
| 350 setInstantFieldTrialStatus_: function(enabled) { | 350 setInstantFieldTrialStatus_: function(enabled) { |
| 351 $('instantEnabledCheckbox').hidden = enabled; | 351 $('instantEnabledCheckbox').hidden = enabled; |
| 352 $('instantFieldTrialCheckbox').hidden = !enabled; | 352 $('instantFieldTrialCheckbox').hidden = !enabled; |
| 353 $('instantLabel').htmlFor = enabled ? 'instantFieldTrialCheckbox' | 353 $('instantLabel').htmlFor = enabled ? 'instantFieldTrialCheckbox' : |
| 354 : 'instantEnabledCheckbox'; | 354 'instantEnabledCheckbox'; |
| 355 }, | 355 }, |
| 356 | 356 |
| 357 /** | 357 /** |
| 358 * Update the Default Browsers section based on the current state. | 358 * Update the Default Browsers section based on the current state. |
| 359 * @param {string} statusString Description of the current default state. | 359 * @param {string} statusString Description of the current default state. |
| 360 * @param {boolean} isDefault Whether or not the browser is currently | 360 * @param {boolean} isDefault Whether or not the browser is currently |
| 361 * default. | 361 * default. |
| 362 * @param {boolean} canBeDefault Whether or not the browser can be default. | 362 * @param {boolean} canBeDefault Whether or not the browser can be default. |
| 363 * @private | 363 * @private |
| 364 */ | 364 */ |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 397 var option = new Option(engine['name'], engine['index']); | 397 var option = new Option(engine['name'], engine['index']); |
| 398 if (defaultValue == option.value) | 398 if (defaultValue == option.value) |
| 399 defaultIndex = i; | 399 defaultIndex = i; |
| 400 engineSelect.appendChild(option); | 400 engineSelect.appendChild(option); |
| 401 } | 401 } |
| 402 if (defaultIndex >= 0) | 402 if (defaultIndex >= 0) |
| 403 engineSelect.selectedIndex = defaultIndex; | 403 engineSelect.selectedIndex = defaultIndex; |
| 404 }, | 404 }, |
| 405 | 405 |
| 406 /** | 406 /** |
| 407 * Returns true if the custom startup page control block should | 407 * Returns true if the custom startup page control block should be enabled. |
| 408 * be enabled. | 408 * @return {boolean} Whether the startup page controls should be enabled. |
| 409 * @returns {boolean} Whether the startup page controls should be | |
| 410 * enabled. | |
| 411 */ | 409 */ |
| 412 shouldEnableCustomStartupPageControls: function(pages) { | 410 shouldEnableCustomStartupPageControls: function(pages) { |
| 413 return $('startupShowPagesButton').checked && | 411 return $('startupShowPagesButton').checked && |
| 414 !this.startup_pages_pref_.disabled; | 412 !this.startup_pages_pref_.disabled; |
| 415 }, | 413 }, |
| 416 | 414 |
| 417 /** | 415 /** |
| 418 * Sets the enabled state of the custom startup page list controls | 416 * Sets the enabled state of the custom startup page list controls |
| 419 * based on the current startup radio button selection. | 417 * based on the current startup radio button selection. |
| 420 * @private | 418 * @private |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 525 | 523 |
| 526 /** | 524 /** |
| 527 * Adds all |profiles| to the list. | 525 * Adds all |profiles| to the list. |
| 528 * @param {Array.<Object>} An array of profile info objects. | 526 * @param {Array.<Object>} An array of profile info objects. |
| 529 * each object is of the form: | 527 * each object is of the form: |
| 530 * profileInfo = { | 528 * profileInfo = { |
| 531 * name: "Profile Name", | 529 * name: "Profile Name", |
| 532 * iconURL: "chrome://path/to/icon/image", | 530 * iconURL: "chrome://path/to/icon/image", |
| 533 * filePath: "/path/to/profile/data/on/disk", | 531 * filePath: "/path/to/profile/data/on/disk", |
| 534 * isCurrentProfile: false | 532 * isCurrentProfile: false |
| 535 * }; | 533 * }. |
|
James Hawkins
2012/02/03 01:28:24
Whatsup with this change?
Tyler Breisacher (Chromium)
2012/02/03 01:40:01
The description is a sentence so the linter wants
James Hawkins
2012/02/03 01:41:58
That's pretty ridiculous. This is quoted code, an
| |
| 536 * @private | 534 * @private |
| 537 */ | 535 */ |
| 538 setProfilesInfo_: function(profiles) { | 536 setProfilesInfo_: function(profiles) { |
| 539 this.setProfileViewSingle_(profiles.length); | 537 this.setProfileViewSingle_(profiles.length); |
| 540 // add it to the list, even if the list is hidden so we can access it | 538 // add it to the list, even if the list is hidden so we can access it |
| 541 // later. | 539 // later. |
| 542 $('profiles-list').dataModel = new ArrayDataModel(profiles); | 540 $('profiles-list').dataModel = new ArrayDataModel(profiles); |
| 543 this.setProfileViewButtonsStatus_(); | 541 this.setProfileViewButtonsStatus_(); |
| 544 }, | 542 }, |
| 545 | 543 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 616 return BrowserOptions.getInstance().username_; | 614 return BrowserOptions.getInstance().username_; |
| 617 }; | 615 }; |
| 618 } | 616 } |
| 619 | 617 |
| 620 // Export | 618 // Export |
| 621 return { | 619 return { |
| 622 BrowserOptions: BrowserOptions | 620 BrowserOptions: BrowserOptions |
| 623 }; | 621 }; |
| 624 | 622 |
| 625 }); | 623 }); |
| OLD | NEW |