| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 */ | 7 */ |
| 8 WebInspector.ActionRegistry = function() | 8 WebInspector.ActionRegistry = function() |
| 9 { | 9 { |
| 10 /** @type {!Map.<string, !WebInspector.Action>} */ | 10 /** @type {!Map.<string, !WebInspector.Action>} */ |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 * @param {!Runtime.Extension} extension | 80 * @param {!Runtime.Extension} extension |
| 81 */ | 81 */ |
| 82 WebInspector.Action = function(extension) | 82 WebInspector.Action = function(extension) |
| 83 { | 83 { |
| 84 WebInspector.Object.call(this); | 84 WebInspector.Object.call(this); |
| 85 this._extension = extension; | 85 this._extension = extension; |
| 86 this._enabled = true; | 86 this._enabled = true; |
| 87 this._toggled = false; | 87 this._toggled = false; |
| 88 } | 88 } |
| 89 | 89 |
| 90 /** @enum {symbol} */ |
| 90 WebInspector.Action.Events = { | 91 WebInspector.Action.Events = { |
| 91 Enabled: "Enabled", | 92 Enabled: Symbol("Enabled"), |
| 92 Toggled: "Toggled" | 93 Toggled: Symbol("Toggled") |
| 93 } | 94 } |
| 94 | 95 |
| 95 WebInspector.Action.prototype = { | 96 WebInspector.Action.prototype = { |
| 96 /** | 97 /** |
| 97 * @return {string} | 98 * @return {string} |
| 98 */ | 99 */ |
| 99 id: function() | 100 id: function() |
| 100 { | 101 { |
| 101 return this._extension.descriptor()["actionId"]; | 102 return this._extension.descriptor()["actionId"]; |
| 102 }, | 103 }, |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 /** | 216 /** |
| 216 * @param {!WebInspector.Context} context | 217 * @param {!WebInspector.Context} context |
| 217 * @param {string} actionId | 218 * @param {string} actionId |
| 218 * @return {boolean} | 219 * @return {boolean} |
| 219 */ | 220 */ |
| 220 handleAction: function(context, actionId) {} | 221 handleAction: function(context, actionId) {} |
| 221 } | 222 } |
| 222 | 223 |
| 223 /** @type {!WebInspector.ActionRegistry} */ | 224 /** @type {!WebInspector.ActionRegistry} */ |
| 224 WebInspector.actionRegistry; | 225 WebInspector.actionRegistry; |
| OLD | NEW |