OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 if (!apiPrivate.panels) | 43 if (!apiPrivate.panels) |
44 apiPrivate.panels = {}; | 44 apiPrivate.panels = {}; |
45 apiPrivate.panels.SearchAction = { | 45 apiPrivate.panels.SearchAction = { |
46 CancelSearch: "cancelSearch", | 46 CancelSearch: "cancelSearch", |
47 PerformSearch: "performSearch", | 47 PerformSearch: "performSearch", |
48 NextSearchResult: "nextSearchResult", | 48 NextSearchResult: "nextSearchResult", |
49 PreviousSearchResult: "previousSearchResult" | 49 PreviousSearchResult: "previousSearchResult" |
50 }; | 50 }; |
51 | 51 |
| 52 /** @enum {string} */ |
52 apiPrivate.Events = { | 53 apiPrivate.Events = { |
53 AuditStarted: "audit-started-", | 54 AuditStarted: "audit-started-", |
54 ButtonClicked: "button-clicked-", | 55 ButtonClicked: "button-clicked-", |
55 PanelObjectSelected: "panel-objectSelected-", | 56 PanelObjectSelected: "panel-objectSelected-", |
56 NetworkRequestFinished: "network-request-finished", | 57 NetworkRequestFinished: "network-request-finished", |
57 OpenResource: "open-resource", | 58 OpenResource: "open-resource", |
58 PanelSearch: "panel-search-", | 59 PanelSearch: "panel-search-", |
59 ResourceAdded: "resource-added", | 60 ResourceAdded: "resource-added", |
60 ResourceContentCommitted: "resource-content-committed", | 61 ResourceContentCommitted: "resource-content-committed", |
61 ViewShown: "view-shown-", | 62 ViewShown: "view-shown-", |
62 ViewHidden: "view-hidden-" | 63 ViewHidden: "view-hidden-" |
63 }; | 64 }; |
64 | 65 |
| 66 /** @enum {string} */ |
65 apiPrivate.Commands = { | 67 apiPrivate.Commands = { |
66 AddAuditCategory: "addAuditCategory", | 68 AddAuditCategory: "addAuditCategory", |
67 AddAuditResult: "addAuditResult", | 69 AddAuditResult: "addAuditResult", |
68 AddRequestHeaders: "addRequestHeaders", | 70 AddRequestHeaders: "addRequestHeaders", |
69 ApplyStyleSheet: "applyStyleSheet", | 71 ApplyStyleSheet: "applyStyleSheet", |
70 CreatePanel: "createPanel", | 72 CreatePanel: "createPanel", |
71 CreateSidebarPane: "createSidebarPane", | 73 CreateSidebarPane: "createSidebarPane", |
72 CreateToolbarButton: "createToolbarButton", | 74 CreateToolbarButton: "createToolbarButton", |
73 EvaluateOnInspectedPage: "evaluateOnInspectedPage", | 75 EvaluateOnInspectedPage: "evaluateOnInspectedPage", |
74 ForwardKeyboardEvent: "_forwardKeyboardEvent", | 76 ForwardKeyboardEvent: "_forwardKeyboardEvent", |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 { | 1013 { |
1012 return "(function(injectedScriptId){ " + | 1014 return "(function(injectedScriptId){ " + |
1013 "var extensionServer;" + | 1015 "var extensionServer;" + |
1014 defineCommonExtensionSymbols.toString() + ";" + | 1016 defineCommonExtensionSymbols.toString() + ";" + |
1015 injectedExtensionAPI.toString() + ";" + | 1017 injectedExtensionAPI.toString() + ";" + |
1016 buildPlatformExtensionAPI(extensionInfo, inspectedTabId, themeName) + ";
" + | 1018 buildPlatformExtensionAPI(extensionInfo, inspectedTabId, themeName) + ";
" + |
1017 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" + | 1019 "platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" + |
1018 "return {};" + | 1020 "return {};" + |
1019 "})"; | 1021 "})"; |
1020 } | 1022 } |
OLD | NEW |