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

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

Issue 1841863003: DevTools: move the force update SW on reload checkbox to the Resources / Service Workers view. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
882 882
883 __proto__: WebInspector.ToolbarItem.prototype 883 __proto__: WebInspector.ToolbarItem.prototype
884 } 884 }
885 885
886 /** 886 /**
887 * @constructor 887 * @constructor
888 * @extends {WebInspector.ToolbarItem} 888 * @extends {WebInspector.ToolbarItem}
889 * @param {string} text 889 * @param {string} text
890 * @param {string=} title 890 * @param {string=} title
891 * @param {!WebInspector.Setting=} setting 891 * @param {!WebInspector.Setting=} setting
892 * @param {function(boolean)=} updateCallback
892 */ 893 */
893 WebInspector.ToolbarCheckbox = function(text, title, setting) 894 WebInspector.ToolbarCheckbox = function(text, title, setting, updateCallback)
dgozman 2016/03/30 21:09:54 I don't see where you use this.
pfeldman 2016/03/31 05:02:31 I no longer am. Done.
894 { 895 {
895 WebInspector.ToolbarItem.call(this, createCheckboxLabel(text)); 896 WebInspector.ToolbarItem.call(this, createCheckboxLabel(text));
896 this.element.classList.add("checkbox"); 897 this.element.classList.add("checkbox");
897 this.inputElement = this.element.checkboxElement; 898 this.inputElement = this.element.checkboxElement;
898 if (title) 899 if (title)
899 this.element.title = title; 900 this.element.title = title;
900 if (setting) 901 if (setting)
901 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting); 902 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting);
903 if (updateCallback)
904 this.inputElement.addEventListener("click", () => updateCallback(this.ch ecked()), false);
902 } 905 }
903 906
904 WebInspector.ToolbarCheckbox.prototype = { 907 WebInspector.ToolbarCheckbox.prototype = {
905 /** 908 /**
906 * @return {boolean} 909 * @return {boolean}
907 */ 910 */
908 checked: function() 911 checked: function()
909 { 912 {
910 return this.inputElement.checked; 913 return this.inputElement.checked;
911 }, 914 },
912 915
916 /**
917 * @param {boolean} checked
918 */
919 setChecked: function(checked)
920 {
921 this.inputElement.checked = checked;
922 },
923
913 __proto__: WebInspector.ToolbarItem.prototype 924 __proto__: WebInspector.ToolbarItem.prototype
914 } 925 }
915 926
916 /** 927 /**
917 * @constructor 928 * @constructor
918 * @extends {WebInspector.Toolbar} 929 * @extends {WebInspector.Toolbar}
919 * @param {string} location 930 * @param {string} location
920 * @param {!Element=} parentElement 931 * @param {!Element=} parentElement
921 */ 932 */
922 WebInspector.ExtensibleToolbar = function(location, parentElement) 933 WebInspector.ExtensibleToolbar = function(location, parentElement)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 /** 989 /**
979 * @return {!Promise} 990 * @return {!Promise}
980 */ 991 */
981 onLoad: function() 992 onLoad: function()
982 { 993 {
983 return this._promise; 994 return this._promise;
984 }, 995 },
985 996
986 __proto__: WebInspector.Toolbar.prototype 997 __proto__: WebInspector.Toolbar.prototype
987 } 998 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698