Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Side by Side Diff: chrome/browser/resources/options2/advanced_options.js

Issue 9113052: [uber page] Cleaning up some nits I found while mucking around in options2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jhawkins' review comments Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/options2/alert_overlay.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 8
9 // 9 //
10 // AdvancedOptions class 10 // AdvancedOptions class
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 // Chrome callbacks 239 // Chrome callbacks
240 // 240 //
241 241
242 // Set the checked state of the metrics reporting checkbox. 242 // Set the checked state of the metrics reporting checkbox.
243 AdvancedOptions.SetMetricsReportingCheckboxState = function( 243 AdvancedOptions.SetMetricsReportingCheckboxState = function(
244 checked, disabled) { 244 checked, disabled) {
245 $('metricsReportingEnabled').checked = checked; 245 $('metricsReportingEnabled').checked = checked;
246 $('metricsReportingEnabled').disabled = disabled; 246 $('metricsReportingEnabled').disabled = disabled;
247 if (disabled) 247 if (disabled)
248 $('metricsReportingEnabledText').className = 'disable-services-span'; 248 $('metricsReportingEnabledText').className = 'disable-services-span';
249 } 249 };
250 250
251 AdvancedOptions.SetMetricsReportingSettingVisibility = function(visible) { 251 AdvancedOptions.SetMetricsReportingSettingVisibility = function(visible) {
252 if (visible) { 252 if (visible) {
253 $('metricsReportingSetting').style.display = 'block'; 253 $('metricsReportingSetting').style.display = 'block';
254 } else { 254 } else {
255 $('metricsReportingSetting').style.display = 'none'; 255 $('metricsReportingSetting').style.display = 'none';
256 } 256 }
257 } 257 };
258 258
259 /** 259 /**
260 * Returns whether the browser in guest mode. Some features are disabled or 260 * Returns whether the browser in guest mode. Some features are disabled or
261 * hidden in guest mode. 261 * hidden in guest mode.
262 * @return {boolean} True if guest mode is currently active. 262 * @return {boolean} True if guest mode is currently active.
263 */ 263 */
264 AdvancedOptions.GuestModeActive = function() { 264 AdvancedOptions.GuestModeActive = function() {
265 return cr.commandLine && cr.commandLine.options['--bwsi']; 265 return cr.commandLine && cr.commandLine.options['--bwsi'];
266 }; 266 };
267 267
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 $('enable-bluetooth').hidden = checked; 415 $('enable-bluetooth').hidden = checked;
416 $('bluetooth-paired-devices-list').parentNode.hidden = !checked; 416 $('bluetooth-paired-devices-list').parentNode.hidden = !checked;
417 $('bluetooth-add-device').hidden = !checked; 417 $('bluetooth-add-device').hidden = !checked;
418 // Flush list of previously discovered devices if bluetooth is turned off. 418 // Flush list of previously discovered devices if bluetooth is turned off.
419 if (!checked) { 419 if (!checked) {
420 $('bluetooth-paired-devices-list').clear(); 420 $('bluetooth-paired-devices-list').clear();
421 $('bluetooth-unpaired-devices-list').clear(); 421 $('bluetooth-unpaired-devices-list').clear();
422 } 422 }
423 if (checked && ! this.isScanning_) 423 if (checked && ! this.isScanning_)
424 findBluetoothDevices_(true); 424 findBluetoothDevices_(true);
425 } 425 };
426 426
427 /** 427 /**
428 * Adds an element to the list of available bluetooth devices. If an element 428 * Adds an element to the list of available bluetooth devices. If an element
429 * with a matching address is found, the existing element is updated. 429 * with a matching address is found, the existing element is updated.
430 * @param {{name: string, 430 * @param {{name: string,
431 * address: string, 431 * address: string,
432 * icon: string, 432 * icon: string,
433 * paired: boolean, 433 * paired: boolean,
434 * connected: boolean}} device 434 * connected: boolean}} device
435 * Decription of the bluetooth device. 435 * Decription of the bluetooth device.
(...skipping 23 matching lines...) Expand all
459 // scanning is implemented in the Bluetooth code. 459 // scanning is implemented in the Bluetooth code.
460 this.isScanning_ = false; 460 this.isScanning_ = false;
461 }; 461 };
462 462
463 // Export 463 // Export
464 return { 464 return {
465 AdvancedOptions: AdvancedOptions 465 AdvancedOptions: AdvancedOptions
466 }; 466 };
467 467
468 }); 468 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options2/alert_overlay.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698