 Chromium Code Reviews
 Chromium Code Reviews Issue 486011:
  DevTools: Add support for inspector layout tests. Step 1.  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/
    
  
    Issue 486011:
  DevTools: Add support for inspector layout tests. Step 1.  (Closed) 
  Base URL: svn://chrome-svn/chrome/trunk/src/| OLD | NEW | 
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 /** | 5 /** | 
| 6 * @fileoverview Tools is a main class that wires all components of the | 6 * @fileoverview Tools is a main class that wires all components of the | 
| 7 * DevTools frontend together. It is also responsible for overriding existing | 7 * DevTools frontend together. It is also responsible for overriding existing | 
| 8 * WebInspector functionality while it is getting upstreamed into WebCore. | 8 * WebInspector functionality while it is getting upstreamed into WebCore. | 
| 9 */ | 9 */ | 
| 10 goog.provide('devtools.Tools'); | 10 goog.provide('devtools.Tools'); | 
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 476 | 476 | 
| 477 (function() { | 477 (function() { | 
| 478 WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked = function( | 478 WebInspector.ElementsPanel.prototype._nodeSearchButtonClicked = function( | 
| 479 event) { | 479 event) { | 
| 480 InspectorBackend.toggleNodeSearch(); | 480 InspectorBackend.toggleNodeSearch(); | 
| 481 this.nodeSearchButton.toggled = !this.nodeSearchButton.toggled; | 481 this.nodeSearchButton.toggled = !this.nodeSearchButton.toggled; | 
| 482 }; | 482 }; | 
| 483 })(); | 483 })(); | 
| 484 | 484 | 
| 485 | 485 | 
| 486 // We need to have a place for postponed tasks | |
| 487 // which should be executed when all the messages between agent and frontend | |
| 488 // are processed. | |
| 
yurys
2009/12/10 15:53:06
no new line after the comment
 | |
| 489 | |
| 490 WebInspector.runAfterPendingDispatchesQueue = []; | |
| 491 | |
| 492 WebInspector.runAfterPendingDispatches = function(callback) { | |
| 493 this.runAfterPendingDispatchesQueue.push(callback); | |
| 494 }; | |
| 495 | |
| 496 WebInspector.queuesAreEmpty = function() { | |
| 497 var copy = this.runAfterPendingDispatchesQueue.slice(); | |
| 498 this.runAfterPendingDispatchesQueue = []; | |
| 499 for (var i = 0; i < copy.length; ++i) | |
| 500 copy[i].call(this); | |
| 501 }; | |
| 502 | |
| 486 (function() { | 503 (function() { | 
| 487 var originalAddToFrame = InspectorFrontendHost.addResourceSourceToFrame; | 504 var originalAddToFrame = InspectorFrontendHost.addResourceSourceToFrame; | 
| 488 InspectorFrontendHost.addResourceSourceToFrame = function(identifier, element) { | 505 InspectorFrontendHost.addResourceSourceToFrame = function(identifier, element) { | 
| 489 var resource = WebInspector.resources[identifier]; | 506 var resource = WebInspector.resources[identifier]; | 
| 490 if (!resource) { | 507 if (!resource) { | 
| 491 return; | 508 return; | 
| 492 } | 509 } | 
| 493 originalAddToFrame.call(this, identifier, resource.mimeType, element); | 510 originalAddToFrame.call(this, identifier, resource.mimeType, element); | 
| 494 }; | 511 }; | 
| 495 })(); | 512 })(); | 
| OLD | NEW |