OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 /** | 278 /** |
279 * @override | 279 * @override |
280 * @param {!WebInspector.Target} target | 280 * @param {!WebInspector.Target} target |
281 */ | 281 */ |
282 targetAdded: function(target) | 282 targetAdded: function(target) |
283 { | 283 { |
284 this._viewport.invalidate(); | 284 this._viewport.invalidate(); |
285 if (WebInspector.targetManager.targets().length > 1 && WebInspector.targ
etManager.mainTarget().isPage()) | 285 if (WebInspector.targetManager.targets().length > 1 && WebInspector.targ
etManager.mainTarget().isPage()) |
286 this._showAllMessagesCheckbox.element.classList.toggle("hidden", fal
se); | 286 this._showAllMessagesCheckbox.element.classList.toggle("hidden", fal
se); |
287 | 287 |
288 | |
289 // Start Dart specific code. | 288 // Start Dart specific code. |
290 target.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.
DebuggerPaused, this._debuggerPaused, this); | 289 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
291 target.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.Debugger
Resumed, this._debuggerResumed, this); | 290 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.Debugge
rPaused, this._debuggerPaused, this); |
| 291 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.Debugge
rResumed, this._debuggerResumed, this); |
292 // End Dart specific code. | 292 // End Dart specific code. |
293 | 293 |
294 | 294 |
295 }, | 295 }, |
296 | 296 |
297 /** | 297 /** |
298 * @override | 298 * @override |
299 * @param {!WebInspector.Target} target | 299 * @param {!WebInspector.Target} target |
300 */ | 300 */ |
301 targetRemoved: function(target) | 301 targetRemoved: function(target) |
302 { | 302 { |
303 | 303 |
304 | 304 |
305 // Begin Dart specific code. | 305 // Begin Dart specific code. |
306 target.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Even
ts.DebuggerPaused, this._debuggerPaused, this); | 306 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
307 target.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Even
ts.DebuggerResumed, this._debuggerResumed, this); | 307 debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.Debu
ggerPaused, this._debuggerPaused, this); |
| 308 debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.Debu
ggerResumed, this._debuggerResumed, this); |
308 // End Dart specific code. | 309 // End Dart specific code. |
309 | 310 |
310 | 311 |
311 }, | 312 }, |
312 | 313 |
313 _registerWithMessageSink: function() | 314 _registerWithMessageSink: function() |
314 { | 315 { |
315 WebInspector.console.messages().forEach(this._addSinkMessage, this); | 316 WebInspector.console.messages().forEach(this._addSinkMessage, this); |
316 WebInspector.console.addEventListener(WebInspector.Console.Events.Messag
eAdded, messageAdded, this); | 317 WebInspector.console.addEventListener(WebInspector.Console.Events.Messag
eAdded, messageAdded, this); |
317 | 318 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 360 |
360 /** | 361 /** |
361 * @override | 362 * @override |
362 * @return {!Element} | 363 * @return {!Element} |
363 */ | 364 */ |
364 defaultFocusedElement: function() | 365 defaultFocusedElement: function() |
365 { | 366 { |
366 return this._promptElement; | 367 return this._promptElement; |
367 }, | 368 }, |
368 | 369 |
| 370 // START DART SPECIFIC CODE |
| 371 /** |
| 372 * @param {!WebInspector.Event} event |
| 373 */ |
| 374 _debuggerPaused: function(event) |
| 375 { |
| 376 this._isPaused = true; |
| 377 this._evaluateOnStackContainer.classList.remove("hidden"); |
| 378 this._updateExecutionContextSelectorState(); |
| 379 }, |
| 380 |
| 381 /** |
| 382 * @param {!WebInspector.Event} event |
| 383 */ |
| 384 _debuggerResumed: function(event) |
| 385 { |
| 386 this._isPaused = false; |
| 387 this._evaluateOnStackContainer.classList.add("hidden"); |
| 388 this._updateExecutionContextSelectorState(); |
| 389 }, |
| 390 |
| 391 _onEvaluateOnStackClick: function(event) |
| 392 { |
| 393 var target = WebInspector.context.flavor(WebInspector.Target); |
| 394 var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| 395 |
| 396 debuggerModel.setEvaluateOnCallFrameMode(this._evaluateOnStackCheckBox.c
hecked); |
| 397 this._updateExecutionContextSelectorState(); |
| 398 }, |
| 399 |
| 400 _updateExecutionContextSelectorState: function() |
| 401 { |
| 402 this._executionContextSelector.setEnabled(!this._isPaused || !this._eval
uateOnStackCheckBox.checked); |
| 403 }, |
| 404 // END DART SPECIFIC CODE |
| 405 |
369 _executionContextChanged: function() | 406 _executionContextChanged: function() |
370 { | 407 { |
371 this._prompt.clearAutoComplete(true); | 408 this._prompt.clearAutoComplete(true); |
372 if (!this._showAllMessagesCheckbox.checked()) | 409 if (!this._showAllMessagesCheckbox.checked()) |
373 this._updateMessageList(); | 410 this._updateMessageList(); |
374 }, | 411 }, |
375 | 412 |
376 willHide: function() | 413 willHide: function() |
377 { | 414 { |
378 this._hidePromptSuggestBox(); | 415 this._hidePromptSuggestBox(); |
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1347 handleAction: function(context, actionId) | 1384 handleAction: function(context, actionId) |
1348 { | 1385 { |
1349 WebInspector.console.show(); | 1386 WebInspector.console.show(); |
1350 } | 1387 } |
1351 } | 1388 } |
1352 | 1389 |
1353 /** | 1390 /** |
1354 * @typedef {{messageIndex: number, matchIndex: number}} | 1391 * @typedef {{messageIndex: number, matchIndex: number}} |
1355 */ | 1392 */ |
1356 WebInspector.ConsoleView.RegexMatchRange; | 1393 WebInspector.ConsoleView.RegexMatchRange; |
OLD | NEW |