OLD | NEW |
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 25 matching lines...) Expand all Loading... |
36 */ | 36 */ |
37 this.events; | 37 this.events; |
38 } | 38 } |
39 | 39 |
40 /** @typedef {{type:string, id:(number|undefined), | 40 /** @typedef {{type:string, id:(number|undefined), |
41 label:(string|undefined), enabled:(boolean|undefined), checked:(b
oolean|undefined), | 41 label:(string|undefined), enabled:(boolean|undefined), checked:(b
oolean|undefined), |
42 subItems:(!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor
>|undefined)}} */ | 42 subItems:(!Array.<!InspectorFrontendHostAPI.ContextMenuDescriptor
>|undefined)}} */ |
43 InspectorFrontendHostAPI.ContextMenuDescriptor; | 43 InspectorFrontendHostAPI.ContextMenuDescriptor; |
44 | 44 |
45 InspectorFrontendHostAPI.Events = { | 45 InspectorFrontendHostAPI.Events = { |
| 46 AddExtensions: "addExtensions", |
46 AppendedToURL: "appendedToURL", | 47 AppendedToURL: "appendedToURL", |
47 CanceledSaveURL: "canceledSaveURL", | 48 CanceledSaveURL: "canceledSaveURL", |
48 ContextMenuCleared: "contextMenuCleared", | 49 ContextMenuCleared: "contextMenuCleared", |
49 ContextMenuItemSelected: "contextMenuItemSelected", | 50 ContextMenuItemSelected: "contextMenuItemSelected", |
50 DeviceCountUpdated: "deviceCountUpdated", | 51 DeviceCountUpdated: "deviceCountUpdated", |
51 DevicesUpdated: "devicesUpdated", | 52 DevicesUpdated: "devicesUpdated", |
52 DispatchMessage: "dispatchMessage", | 53 DispatchMessage: "dispatchMessage", |
53 DispatchMessageChunk: "dispatchMessageChunk", | 54 DispatchMessageChunk: "dispatchMessageChunk", |
54 EnterInspectElementMode: "enterInspectElementMode", | 55 EnterInspectElementMode: "enterInspectElementMode", |
55 FileSystemsLoaded: "fileSystemsLoaded", | 56 FileSystemsLoaded: "fileSystemsLoaded", |
56 FileSystemRemoved: "fileSystemRemoved", | 57 FileSystemRemoved: "fileSystemRemoved", |
57 FileSystemAdded: "fileSystemAdded", | 58 FileSystemAdded: "fileSystemAdded", |
58 IndexingTotalWorkCalculated: "indexingTotalWorkCalculated", | 59 IndexingTotalWorkCalculated: "indexingTotalWorkCalculated", |
59 IndexingWorked: "indexingWorked", | 60 IndexingWorked: "indexingWorked", |
60 IndexingDone: "indexingDone", | 61 IndexingDone: "indexingDone", |
61 KeyEventUnhandled: "keyEventUnhandled", | 62 KeyEventUnhandled: "keyEventUnhandled", |
62 RevealSourceLine: "revealSourceLine", | 63 RevealSourceLine: "revealSourceLine", |
63 SavedURL: "savedURL", | 64 SavedURL: "savedURL", |
64 SearchCompleted: "searchCompleted", | 65 SearchCompleted: "searchCompleted", |
| 66 SetInspectedTabId: "setInspectedTabId", |
65 SetToolbarColors: "setToolbarColors", | 67 SetToolbarColors: "setToolbarColors", |
66 SetUseSoftMenu: "setUseSoftMenu", | 68 SetUseSoftMenu: "setUseSoftMenu", |
67 ShowConsole: "showConsole" | 69 ShowConsole: "showConsole" |
68 } | 70 } |
69 | 71 |
70 InspectorFrontendHostAPI.EventDescriptors = [ | 72 InspectorFrontendHostAPI.EventDescriptors = [ |
| 73 [InspectorFrontendHostAPI.Events.AddExtensions, ["extensions"]], |
71 [InspectorFrontendHostAPI.Events.AppendedToURL, ["url"]], | 74 [InspectorFrontendHostAPI.Events.AppendedToURL, ["url"]], |
72 [InspectorFrontendHostAPI.Events.CanceledSaveURL, ["url"]], | 75 [InspectorFrontendHostAPI.Events.CanceledSaveURL, ["url"]], |
73 [InspectorFrontendHostAPI.Events.ContextMenuCleared, []], | 76 [InspectorFrontendHostAPI.Events.ContextMenuCleared, []], |
74 [InspectorFrontendHostAPI.Events.ContextMenuItemSelected, ["id"]], | 77 [InspectorFrontendHostAPI.Events.ContextMenuItemSelected, ["id"]], |
75 [InspectorFrontendHostAPI.Events.DeviceCountUpdated, ["count"]], | 78 [InspectorFrontendHostAPI.Events.DeviceCountUpdated, ["count"]], |
76 [InspectorFrontendHostAPI.Events.DevicesUpdated, ["devices"]], | 79 [InspectorFrontendHostAPI.Events.DevicesUpdated, ["devices"]], |
77 [InspectorFrontendHostAPI.Events.DispatchMessage, ["messageObject"]], | 80 [InspectorFrontendHostAPI.Events.DispatchMessage, ["messageObject"]], |
78 [InspectorFrontendHostAPI.Events.DispatchMessageChunk, ["messageChunk", "mes
sageSize"]], | 81 [InspectorFrontendHostAPI.Events.DispatchMessageChunk, ["messageChunk", "mes
sageSize"]], |
79 [InspectorFrontendHostAPI.Events.EnterInspectElementMode, []], | 82 [InspectorFrontendHostAPI.Events.EnterInspectElementMode, []], |
80 [InspectorFrontendHostAPI.Events.FileSystemsLoaded, ["fileSystems"]], | 83 [InspectorFrontendHostAPI.Events.FileSystemsLoaded, ["fileSystems"]], |
81 [InspectorFrontendHostAPI.Events.FileSystemRemoved, ["fileSystemPath"]], | 84 [InspectorFrontendHostAPI.Events.FileSystemRemoved, ["fileSystemPath"]], |
82 [InspectorFrontendHostAPI.Events.FileSystemAdded, ["errorMessage", "fileSyst
em"]], | 85 [InspectorFrontendHostAPI.Events.FileSystemAdded, ["errorMessage", "fileSyst
em"]], |
83 [InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, ["requestId",
"fileSystemPath", "totalWork"]], | 86 [InspectorFrontendHostAPI.Events.IndexingTotalWorkCalculated, ["requestId",
"fileSystemPath", "totalWork"]], |
84 [InspectorFrontendHostAPI.Events.IndexingWorked, ["requestId", "fileSystemPa
th", "worked"]], | 87 [InspectorFrontendHostAPI.Events.IndexingWorked, ["requestId", "fileSystemPa
th", "worked"]], |
85 [InspectorFrontendHostAPI.Events.IndexingDone, ["requestId", "fileSystemPath
"]], | 88 [InspectorFrontendHostAPI.Events.IndexingDone, ["requestId", "fileSystemPath
"]], |
86 [InspectorFrontendHostAPI.Events.KeyEventUnhandled, ["event"]], | 89 [InspectorFrontendHostAPI.Events.KeyEventUnhandled, ["event"]], |
87 [InspectorFrontendHostAPI.Events.RevealSourceLine, ["url", "lineNumber", "co
lumnNumber"]], | 90 [InspectorFrontendHostAPI.Events.RevealSourceLine, ["url", "lineNumber", "co
lumnNumber"]], |
88 [InspectorFrontendHostAPI.Events.SavedURL, ["url"]], | 91 [InspectorFrontendHostAPI.Events.SavedURL, ["url"]], |
89 [InspectorFrontendHostAPI.Events.SearchCompleted, ["requestId", "fileSystemP
ath", "files"]], | 92 [InspectorFrontendHostAPI.Events.SearchCompleted, ["requestId", "fileSystemP
ath", "files"]], |
| 93 [InspectorFrontendHostAPI.Events.SetInspectedTabId, ["tabId"]], |
90 [InspectorFrontendHostAPI.Events.SetToolbarColors, ["backgroundColor", "colo
r"]], | 94 [InspectorFrontendHostAPI.Events.SetToolbarColors, ["backgroundColor", "colo
r"]], |
91 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, ["useSoftMenu"]], | 95 [InspectorFrontendHostAPI.Events.SetUseSoftMenu, ["useSoftMenu"]], |
92 [InspectorFrontendHostAPI.Events.ShowConsole, []] | 96 [InspectorFrontendHostAPI.Events.ShowConsole, []] |
93 ]; | 97 ]; |
94 | 98 |
95 InspectorFrontendHostAPI.prototype = { | 99 InspectorFrontendHostAPI.prototype = { |
96 addFileSystem: function() { }, | 100 addFileSystem: function() { }, |
97 | 101 |
98 /** | 102 /** |
99 * @param {string} url | 103 * @param {string} url |
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 * @param {number} id | 710 * @param {number} id |
707 * @param {?string} error | 711 * @param {?string} error |
708 */ | 712 */ |
709 embedderMessageAck: function(id, error) | 713 embedderMessageAck: function(id, error) |
710 { | 714 { |
711 InspectorFrontendHost["embedderMessageAck"](id, error); | 715 InspectorFrontendHost["embedderMessageAck"](id, error); |
712 } | 716 } |
713 } | 717 } |
714 | 718 |
715 var InspectorFrontendAPI = new InspectorFrontendAPIImpl(); | 719 var InspectorFrontendAPI = new InspectorFrontendAPIImpl(); |
OLD | NEW |