| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 var subsection = createElement('div'); | 440 var subsection = createElement('div'); |
| 441 var warning = subsection.createChild('span', 'settings-experiments-warning-s
ubsection-warning'); | 441 var warning = subsection.createChild('span', 'settings-experiments-warning-s
ubsection-warning'); |
| 442 warning.textContent = Common.UIString('WARNING:'); | 442 warning.textContent = Common.UIString('WARNING:'); |
| 443 subsection.createTextChild(' '); | 443 subsection.createTextChild(' '); |
| 444 var message = subsection.createChild('span', 'settings-experiments-warning-s
ubsection-message'); | 444 var message = subsection.createChild('span', 'settings-experiments-warning-s
ubsection-message'); |
| 445 message.textContent = Common.UIString('These experiments could be dangerous
and may require restart.'); | 445 message.textContent = Common.UIString('These experiments could be dangerous
and may require restart.'); |
| 446 return subsection; | 446 return subsection; |
| 447 } | 447 } |
| 448 | 448 |
| 449 _createExperimentCheckbox(experiment) { | 449 _createExperimentCheckbox(experiment) { |
| 450 var label = UI.createCheckboxLabel(Common.UIString(experiment.title), experi
ment.isEnabled()); | 450 var label = UI.CheckboxLabel.create(Common.UIString(experiment.title), exper
iment.isEnabled()); |
| 451 var input = label.checkboxElement; | 451 var input = label.checkboxElement; |
| 452 input.name = experiment.name; | 452 input.name = experiment.name; |
| 453 function listener() { | 453 function listener() { |
| 454 experiment.setEnabled(input.checked); | 454 experiment.setEnabled(input.checked); |
| 455 } | 455 } |
| 456 input.addEventListener('click', listener, false); | 456 input.addEventListener('click', listener, false); |
| 457 | 457 |
| 458 var p = createElement('p'); | 458 var p = createElement('p'); |
| 459 p.className = experiment.hidden && !experiment.isEnabled() ? 'settings-exper
iment-hidden' : ''; | 459 p.className = experiment.hidden && !experiment.isEnabled() ? 'settings-exper
iment-hidden' : ''; |
| 460 p.appendChild(label); | 460 p.appendChild(label); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 return; | 544 return; |
| 545 var settings = extension.descriptor()['settings']; | 545 var settings = extension.descriptor()['settings']; |
| 546 if (settings && settings.indexOf(setting.name) !== -1) { | 546 if (settings && settings.indexOf(setting.name) !== -1) { |
| 547 InspectorFrontendHost.bringToFront(); | 547 InspectorFrontendHost.bringToFront(); |
| 548 Settings.SettingsScreen._showSettingsScreen(extension.descriptor()['id']
); | 548 Settings.SettingsScreen._showSettingsScreen(extension.descriptor()['id']
); |
| 549 success = true; | 549 success = true; |
| 550 } | 550 } |
| 551 } | 551 } |
| 552 } | 552 } |
| 553 }; | 553 }; |
| OLD | NEW |