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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 this._registerHandler(commands.CreateToolbarButton, this._onCreateToolbarBut
ton.bind(this)); | 61 this._registerHandler(commands.CreateToolbarButton, this._onCreateToolbarBut
ton.bind(this)); |
62 this._registerHandler(commands.EvaluateOnInspectedPage, this._onEvaluateOnIn
spectedPage.bind(this)); | 62 this._registerHandler(commands.EvaluateOnInspectedPage, this._onEvaluateOnIn
spectedPage.bind(this)); |
63 this._registerHandler(commands.ForwardKeyboardEvent, this._onForwardKeyboard
Event.bind(this)); | 63 this._registerHandler(commands.ForwardKeyboardEvent, this._onForwardKeyboard
Event.bind(this)); |
64 this._registerHandler(commands.GetHAR, this._onGetHAR.bind(this)); | 64 this._registerHandler(commands.GetHAR, this._onGetHAR.bind(this)); |
65 this._registerHandler(commands.GetPageResources, this._onGetPageResources.bi
nd(this)); | 65 this._registerHandler(commands.GetPageResources, this._onGetPageResources.bi
nd(this)); |
66 this._registerHandler(commands.GetRequestContent, this._onGetRequestContent.
bind(this)); | 66 this._registerHandler(commands.GetRequestContent, this._onGetRequestContent.
bind(this)); |
67 this._registerHandler(commands.GetResourceContent, this._onGetResourceConten
t.bind(this)); | 67 this._registerHandler(commands.GetResourceContent, this._onGetResourceConten
t.bind(this)); |
68 this._registerHandler(commands.Reload, this._onReload.bind(this)); | 68 this._registerHandler(commands.Reload, this._onReload.bind(this)); |
69 this._registerHandler(commands.SetOpenResourceHandler, this._onSetOpenResour
ceHandler.bind(this)); | 69 this._registerHandler(commands.SetOpenResourceHandler, this._onSetOpenResour
ceHandler.bind(this)); |
70 this._registerHandler(commands.SetResourceContent, this._onSetResourceConten
t.bind(this)); | 70 this._registerHandler(commands.SetResourceContent, this._onSetResourceConten
t.bind(this)); |
71 this._registerHandler(commands.SetSidebarHeight, this._onSetSidebarHeight.bi
nd(this)); | |
72 this._registerHandler(commands.SetSidebarContent, this._onSetSidebarContent.
bind(this)); | 71 this._registerHandler(commands.SetSidebarContent, this._onSetSidebarContent.
bind(this)); |
73 this._registerHandler(commands.SetSidebarPage, this._onSetSidebarPage.bind(t
his)); | 72 this._registerHandler(commands.SetSidebarPage, this._onSetSidebarPage.bind(t
his)); |
74 this._registerHandler(commands.ShowPanel, this._onShowPanel.bind(this)); | 73 this._registerHandler(commands.ShowPanel, this._onShowPanel.bind(this)); |
75 this._registerHandler(commands.StopAuditCategoryRun, this._onStopAuditCatego
ryRun.bind(this)); | 74 this._registerHandler(commands.StopAuditCategoryRun, this._onStopAuditCatego
ryRun.bind(this)); |
76 this._registerHandler(commands.Subscribe, this._onSubscribe.bind(this)); | 75 this._registerHandler(commands.Subscribe, this._onSubscribe.bind(this)); |
77 this._registerHandler(commands.OpenResource, this._onOpenResource.bind(this)
); | 76 this._registerHandler(commands.OpenResource, this._onOpenResource.bind(this)
); |
78 this._registerHandler(commands.Unsubscribe, this._onUnsubscribe.bind(this)); | 77 this._registerHandler(commands.Unsubscribe, this._onUnsubscribe.bind(this)); |
79 this._registerHandler(commands.UpdateButton, this._onUpdateButton.bind(this)
); | 78 this._registerHandler(commands.UpdateButton, this._onUpdateButton.bind(this)
); |
80 this._registerHandler(commands.UpdateAuditProgress, this._onUpdateAuditProgr
ess.bind(this)); | 79 this._registerHandler(commands.UpdateAuditProgress, this._onUpdateAuditProgr
ess.bind(this)); |
81 window.addEventListener("message", this._onWindowMessage.bind(this), false);
// Only for main window. | 80 window.addEventListener("message", this._onWindowMessage.bind(this), false);
// Only for main window. |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 }, | 327 }, |
329 | 328 |
330 /** | 329 /** |
331 * @return {!Array.<!WebInspector.ExtensionSidebarPane>} | 330 * @return {!Array.<!WebInspector.ExtensionSidebarPane>} |
332 */ | 331 */ |
333 sidebarPanes: function() | 332 sidebarPanes: function() |
334 { | 333 { |
335 return this._sidebarPanes; | 334 return this._sidebarPanes; |
336 }, | 335 }, |
337 | 336 |
338 _onSetSidebarHeight: function(message) | |
339 { | |
340 var sidebar = this._clientObjects[message.id]; | |
341 if (!sidebar) | |
342 return this._status.E_NOTFOUND(message.id); | |
343 sidebar.setHeight(message.height); | |
344 return this._status.OK(); | |
345 }, | |
346 | |
347 _onSetSidebarContent: function(message, port) | 337 _onSetSidebarContent: function(message, port) |
348 { | 338 { |
349 var sidebar = this._clientObjects[message.id]; | 339 var sidebar = this._clientObjects[message.id]; |
350 if (!sidebar) | 340 if (!sidebar) |
351 return this._status.E_NOTFOUND(message.id); | 341 return this._status.E_NOTFOUND(message.id); |
352 | 342 |
353 /** | 343 /** |
354 * @this {WebInspector.ExtensionServer} | 344 * @this {WebInspector.ExtensionServer} |
355 */ | 345 */ |
356 function callback(error) | 346 function callback(error) |
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 /** | 1071 /** |
1082 * @typedef {{code: string, description: string, details: !Array.<*>}} | 1072 * @typedef {{code: string, description: string, details: !Array.<*>}} |
1083 */ | 1073 */ |
1084 WebInspector.ExtensionStatus.Record; | 1074 WebInspector.ExtensionStatus.Record; |
1085 | 1075 |
1086 WebInspector.extensionAPI = {}; | 1076 WebInspector.extensionAPI = {}; |
1087 defineCommonExtensionSymbols(WebInspector.extensionAPI); | 1077 defineCommonExtensionSymbols(WebInspector.extensionAPI); |
1088 | 1078 |
1089 /** @type {!WebInspector.ExtensionServer} */ | 1079 /** @type {!WebInspector.ExtensionServer} */ |
1090 WebInspector.extensionServer; | 1080 WebInspector.extensionServer; |
OLD | NEW |