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

Side by Side Diff: Source/devtools/front_end/components/InspectElementModeController.js

Issue 722713002: DevTools: get rid of getters and setters in StatusBarButton. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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) 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 */ 63 */
64 targetRemoved: function(target) 64 targetRemoved: function(target)
65 { 65 {
66 }, 66 },
67 67
68 /** 68 /**
69 * @return {boolean} 69 * @return {boolean}
70 */ 70 */
71 enabled: function() 71 enabled: function()
72 { 72 {
73 return this._toggleSearchButton.toggled; 73 return this._toggleSearchButton.toggled();
74 }, 74 },
75 75
76 disable: function() 76 disable: function()
77 { 77 {
78 if (this.enabled()) 78 if (this.enabled())
79 this._toggleSearch(); 79 this._toggleSearch();
80 }, 80 },
81 81
82 _toggleSearch: function() 82 _toggleSearch: function()
83 { 83 {
84 var enabled = !this.enabled(); 84 var enabled = !this.enabled();
85 this._toggleSearchButton.toggled = enabled; 85 this._toggleSearchButton.setToggled(enabled);
86 86
87 var targets = WebInspector.targetManager.targets(); 87 var targets = WebInspector.targetManager.targets();
88 for (var i = 0; i < targets.length; ++i) 88 for (var i = 0; i < targets.length; ++i)
89 targets[i].domModel.setInspectModeEnabled(enabled, WebInspector.sett ings.showUAShadowDOM.get()); 89 targets[i].domModel.setInspectModeEnabled(enabled, WebInspector.sett ings.showUAShadowDOM.get());
90 } 90 }
91 } 91 }
92 92
93 /** 93 /**
94 * @constructor 94 * @constructor
95 * @implements {WebInspector.ActionDelegate} 95 * @implements {WebInspector.ActionDelegate}
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 { 127 {
128 if (!WebInspector.inspectElementModeController) 128 if (!WebInspector.inspectElementModeController)
129 return null; 129 return null;
130 130
131 return WebInspector.inspectElementModeController._toggleSearchButton; 131 return WebInspector.inspectElementModeController._toggleSearchButton;
132 } 132 }
133 } 133 }
134 134
135 /** @type {?WebInspector.InspectElementModeController} */ 135 /** @type {?WebInspector.InspectElementModeController} */
136 WebInspector.inspectElementModeController = null; 136 WebInspector.inspectElementModeController = null;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components/Drawer.js ('k') | Source/devtools/front_end/elements/AnimationsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698