OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 this._registerHandler(commands.UpdateButton, this._onUpdateButton.bind(this)
); | 79 this._registerHandler(commands.UpdateButton, this._onUpdateButton.bind(this)
); |
80 this._registerHandler(commands.UpdateAuditProgress, this._onUpdateAuditProgr
ess.bind(this)); | 80 this._registerHandler(commands.UpdateAuditProgress, this._onUpdateAuditProgr
ess.bind(this)); |
81 window.addEventListener("message", this._onWindowMessage.bind(this), false);
// Only for main window. | 81 window.addEventListener("message", this._onWindowMessage.bind(this), false);
// Only for main window. |
82 | 82 |
83 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.AddExtensions, this._addExtensions, this); | 83 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.AddExtensions, this._addExtensions, this); |
84 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.SetInspectedTabId, this._setInspectedTabId, this); | 84 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.Event
s.SetInspectedTabId, this._setInspectedTabId, this); |
85 | 85 |
86 this._initExtensions(); | 86 this._initExtensions(); |
87 } | 87 } |
88 | 88 |
| 89 /** @enum {symbol} */ |
89 WebInspector.ExtensionServer.Events = { | 90 WebInspector.ExtensionServer.Events = { |
90 SidebarPaneAdded: "SidebarPaneAdded", | 91 SidebarPaneAdded: Symbol("SidebarPaneAdded"), |
91 AuditCategoryAdded: "AuditCategoryAdded" | 92 AuditCategoryAdded: Symbol("AuditCategoryAdded") |
92 } | 93 } |
93 | 94 |
94 WebInspector.ExtensionServer.prototype = { | 95 WebInspector.ExtensionServer.prototype = { |
95 initializeExtensions: function() | 96 initializeExtensions: function() |
96 { | 97 { |
97 this._initializeCommandIssued = true; | 98 this._initializeCommandIssued = true; |
98 if (this._pendingExtensionInfos) { | 99 if (this._pendingExtensionInfos) { |
99 this._pendingExtensionInfos.forEach(this._addExtension, this); | 100 this._pendingExtensionInfos.forEach(this._addExtension, this); |
100 delete this._pendingExtensionInfos; | 101 delete this._pendingExtensionInfos; |
101 } | 102 } |
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 /** | 1085 /** |
1085 * @typedef {{code: string, description: string, details: !Array.<*>}} | 1086 * @typedef {{code: string, description: string, details: !Array.<*>}} |
1086 */ | 1087 */ |
1087 WebInspector.ExtensionStatus.Record; | 1088 WebInspector.ExtensionStatus.Record; |
1088 | 1089 |
1089 WebInspector.extensionAPI = {}; | 1090 WebInspector.extensionAPI = {}; |
1090 defineCommonExtensionSymbols(WebInspector.extensionAPI); | 1091 defineCommonExtensionSymbols(WebInspector.extensionAPI); |
1091 | 1092 |
1092 /** @type {!WebInspector.ExtensionServer} */ | 1093 /** @type {!WebInspector.ExtensionServer} */ |
1093 WebInspector.extensionServer; | 1094 WebInspector.extensionServer; |
OLD | NEW |