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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 projectDelegate.indexingDone(requestId); | 159 projectDelegate.indexingDone(requestId); |
160 }, | 160 }, |
161 | 161 |
162 searchCompleted: function(requestId, fileSystemPath, files) | 162 searchCompleted: function(requestId, fileSystemPath, files) |
163 { | 163 { |
164 var projectDelegate = WebInspector.fileSystemWorkspaceProvider.delegate(
fileSystemPath); | 164 var projectDelegate = WebInspector.fileSystemWorkspaceProvider.delegate(
fileSystemPath); |
165 projectDelegate.searchCompleted(requestId, files); | 165 projectDelegate.searchCompleted(requestId, files); |
166 }, | 166 }, |
167 | 167 |
168 /** | 168 /** |
| 169 * @param {!InspectorFrontendAPI.ForwardedKeyboardEvent} event |
| 170 */ |
| 171 keyEventUnhandled: function(event) |
| 172 { |
| 173 InspectorFrontendAPI._runOnceLoaded(function() { |
| 174 WebInspector.forwardedEventHandler.keyEventReceived(event.type, even
t.keyIdentifier, event.keyCode, event.modifiers); |
| 175 }); |
| 176 }, |
| 177 |
| 178 /** |
169 * @param {string} url | 179 * @param {string} url |
170 */ | 180 */ |
171 savedURL: function(url) | 181 savedURL: function(url) |
172 { | 182 { |
173 WebInspector.fileManager.savedURL(url); | 183 WebInspector.fileManager.savedURL(url); |
174 }, | 184 }, |
175 | 185 |
176 /** | 186 /** |
177 * @param {string} url | 187 * @param {string} url |
178 */ | 188 */ |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 _runOnceLoaded: function(command) | 260 _runOnceLoaded: function(command) |
251 { | 261 { |
252 if (InspectorFrontendAPI._isLoaded) { | 262 if (InspectorFrontendAPI._isLoaded) { |
253 command(); | 263 command(); |
254 return; | 264 return; |
255 } | 265 } |
256 InspectorFrontendAPI._pendingCommands.push(command); | 266 InspectorFrontendAPI._pendingCommands.push(command); |
257 } | 267 } |
258 } | 268 } |
259 | 269 |
| 270 /** @typedef {!Object.<{type: string, keyCode: (number|undefined), keyIdentifier
: (string|undefined), modifiers: (number|undefined)}>} */ |
| 271 InspectorFrontendAPI.ForwardedKeyboardEvent; |
| 272 |
260 function onMessageFromOpener(event) | 273 function onMessageFromOpener(event) |
261 { | 274 { |
262 if (event.source === window.opener) | 275 if (event.source === window.opener) |
263 InspectorFrontendAPI._dispatch(event.data); | 276 InspectorFrontendAPI._dispatch(event.data); |
264 } | 277 } |
265 | 278 |
266 if (window.opener && window.dispatchStandaloneTestRunnerMessages) | 279 if (window.opener && window.dispatchStandaloneTestRunnerMessages) |
267 window.addEventListener("message", onMessageFromOpener, true); | 280 window.addEventListener("message", onMessageFromOpener, true); |
OLD | NEW |