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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js

Issue 1564363005: [DevTools] Device Mode polish. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 }, 327 },
328 328
329 /** 329 /**
330 * @param {boolean} dimmed 330 * @param {boolean} dimmed
331 */ 331 */
332 setDimmed: function(dimmed) 332 setDimmed: function(dimmed)
333 { 333 {
334 this.element.classList.toggle("toolbar-dimmed", dimmed); 334 this.element.classList.toggle("toolbar-dimmed", dimmed);
335 }, 335 },
336 336
337 addDropDownArrow: function()
338 {
339 this.element.classList.add("toolbar-has-dropdown");
340 this.element.createChild("div", "toolbar-dropdown-arrow");
341 },
342
337 __proto__: WebInspector.ToolbarItem.prototype 343 __proto__: WebInspector.ToolbarItem.prototype
338 } 344 }
339 345
340 /** 346 /**
341 * @constructor 347 * @constructor
342 * @extends {WebInspector.ToolbarLabel} 348 * @extends {WebInspector.ToolbarLabel}
343 * @param {string} title 349 * @param {string} title
344 * @param {string} glyph 350 * @param {string} glyph
345 */ 351 */
346 WebInspector.ToolbarButton = function(title, glyph) 352 WebInspector.ToolbarButton = function(title, glyph)
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 * @constructor 719 * @constructor
714 * @extends {WebInspector.ToolbarItem} 720 * @extends {WebInspector.ToolbarItem}
715 * @param {?function(!Event)} changeHandler 721 * @param {?function(!Event)} changeHandler
716 * @param {string=} className 722 * @param {string=} className
717 */ 723 */
718 WebInspector.ToolbarComboBox = function(changeHandler, className) 724 WebInspector.ToolbarComboBox = function(changeHandler, className)
719 { 725 {
720 WebInspector.ToolbarItem.call(this, createElementWithClass("span", "toolbar- select-container")); 726 WebInspector.ToolbarItem.call(this, createElementWithClass("span", "toolbar- select-container"));
721 727
722 this._selectElement = this.element.createChild("select", "toolbar-item"); 728 this._selectElement = this.element.createChild("select", "toolbar-item");
723 this.element.createChild("div", "toolbar-select-arrow"); 729 this.element.createChild("div", "toolbar-dropdown-arrow");
724 if (changeHandler) 730 if (changeHandler)
725 this._selectElement.addEventListener("change", changeHandler, false); 731 this._selectElement.addEventListener("change", changeHandler, false);
726 if (className) 732 if (className)
727 this._selectElement.classList.add(className); 733 this._selectElement.classList.add(className);
728 } 734 }
729 735
730 WebInspector.ToolbarComboBox.prototype = { 736 WebInspector.ToolbarComboBox.prototype = {
731 /** 737 /**
732 * @return {!HTMLSelectElement} 738 * @return {!HTMLSelectElement}
733 */ 739 */
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 for (var i = 0; i < items.length; ++i) { 936 for (var i = 0; i < items.length; ++i) {
931 var item = items[i]; 937 var item = items[i];
932 if (item) 938 if (item)
933 this.appendToolbarItem(item); 939 this.appendToolbarItem(item);
934 } 940 }
935 } 941 }
936 }, 942 },
937 943
938 __proto__: WebInspector.Toolbar.prototype 944 __proto__: WebInspector.Toolbar.prototype
939 } 945 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698