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

Side by Side Diff: Source/devtools/front_end/ui/StatusBarButton.js

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 WebInspector.StatusBarButton.Provider.prototype = { 443 WebInspector.StatusBarButton.Provider.prototype = {
444 /** 444 /**
445 * @return {?WebInspector.StatusBarButton} 445 * @return {?WebInspector.StatusBarButton}
446 */ 446 */
447 button: function() {} 447 button: function() {}
448 } 448 }
449 449
450 /** 450 /**
451 * @constructor 451 * @constructor
452 * @extends {WebInspector.StatusBarItem} 452 * @extends {WebInspector.StatusBarItem}
453 * @param {?function(!Event)} changeHandler 453 * @param {?function(?Event)} changeHandler
454 * @param {string=} className 454 * @param {string=} className
455 */ 455 */
456 WebInspector.StatusBarComboBox = function(changeHandler, className) 456 WebInspector.StatusBarComboBox = function(changeHandler, className)
457 { 457 {
458 WebInspector.StatusBarItem.call(this, "span"); 458 WebInspector.StatusBarItem.call(this, "span");
459 this.element.className = "status-bar-select-container"; 459 this.element.className = "status-bar-select-container";
460 460
461 this._selectElement = this.element.createChild("select", "status-bar-item"); 461 this._selectElement = this.element.createChild("select", "status-bar-item");
462 this.element.createChild("div", "status-bar-select-arrow"); 462 this.element.createChild("div", "status-bar-select-arrow");
463 if (changeHandler) 463 if (changeHandler)
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 if (this._selectElement.selectedIndex >= 0) 537 if (this._selectElement.selectedIndex >= 0)
538 return this._selectElement[this._selectElement.selectedIndex]; 538 return this._selectElement[this._selectElement.selectedIndex];
539 return null; 539 return null;
540 }, 540 },
541 541
542 /** 542 /**
543 * @param {!Element} option 543 * @param {!Element} option
544 */ 544 */
545 select: function(option) 545 select: function(option)
546 { 546 {
547 this._selectElement.selectedIndex = Array.prototype.indexOf.call(this._s electElement, option); 547 this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @ty pe {?} */ (this._selectElement), option);
548 }, 548 },
549 549
550 /** 550 /**
551 * @param {number} index 551 * @param {number} index
552 */ 552 */
553 setSelectedIndex: function(index) 553 setSelectedIndex: function(index)
554 { 554 {
555 this._selectElement.selectedIndex = index; 555 this._selectElement.selectedIndex = index;
556 }, 556 },
557 557
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 var options = []; 679 var options = [];
680 for (var index = 0; index < this._states.length; index++) { 680 for (var index = 0; index < this._states.length; index++) {
681 if (this._states[index] !== this.state && this._states[index] !== th is._currentState) 681 if (this._states[index] !== this.state && this._states[index] !== th is._currentState)
682 options.push(this._buttons[index]); 682 options.push(this._buttons[index]);
683 } 683 }
684 return options; 684 return options;
685 }, 685 },
686 686
687 __proto__: WebInspector.StatusBarButton.prototype 687 __proto__: WebInspector.StatusBarButton.prototype
688 } 688 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698