| 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 Stub implementation of the InspectorController API. | 6 * @fileoverview Stub implementation of the InspectorController API. |
| 7 * This stub class is supposed to make front-end a standalone WebApp | 7 * This stub class is supposed to make front-end a standalone WebApp |
| 8 * that can be implemented/refactored in isolation from the Web browser | 8 * that can be implemented/refactored in isolation from the Web browser |
| 9 * backend. Clients need to subclass it in order to wire calls to the | 9 * backend. Clients need to subclass it in order to wire calls to the |
| 10 * non-stub backends. | 10 * non-stub backends. |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 | 440 |
| 441 /** | 441 /** |
| 442 * Tells backend to stop collecting profiler data. | 442 * Tells backend to stop collecting profiler data. |
| 443 */ | 443 */ |
| 444 devtools.InspectorController.prototype.stopProfiling = function() { | 444 devtools.InspectorController.prototype.stopProfiling = function() { |
| 445 }; | 445 }; |
| 446 | 446 |
| 447 | 447 |
| 448 /** | 448 /** |
| 449 * TODO(mnaganov): Remove after injected script change landing in WebKit. | |
| 450 * @return {Array.<Object>} Profile snapshots array. | |
| 451 */ | |
| 452 devtools.InspectorController.prototype.profiles = function() { | |
| 453 return []; | |
| 454 }; | |
| 455 | |
| 456 | |
| 457 /** | |
| 458 * Async function for retrieving headers of existing profiles. | 449 * Async function for retrieving headers of existing profiles. |
| 459 */ | 450 */ |
| 460 devtools.InspectorController.prototype.getProfileHeaders = function(callId) { | 451 devtools.InspectorController.prototype.getProfileHeaders = function(callId) { |
| 461 WebInspector.didGetProfileHeaders(callId, []); | |
| 462 }; | 452 }; |
| 463 | 453 |
| 464 | 454 |
| 465 /** | 455 /** |
| 466 * Async function for lazy loading an existing profile. | 456 * Async function for lazy loading an existing profile. |
| 467 */ | 457 */ |
| 468 devtools.InspectorController.prototype.getProfile = function(callId, uid) { | 458 devtools.InspectorController.prototype.getProfile = function(callId, uid) { |
| 469 if (WebInspector.__fullProfiles && (uid in WebInspector.__fullProfiles)) { | |
| 470 WebInspector.didGetProfile(callId, WebInspector.__fullProfiles[uid]); | |
| 471 } | |
| 472 }; | 459 }; |
| 473 | 460 |
| 474 | 461 |
| 475 /** | 462 /** |
| 476 * Tells backend to create a heap snapshot. | 463 * Tells backend to create a heap snapshot. |
| 477 */ | 464 */ |
| 478 devtools.InspectorController.prototype.takeHeapSnapshot = function() { | 465 devtools.InspectorController.prototype.takeHeapSnapshot = function() { |
| 479 }; | 466 }; |
| 480 | 467 |
| 481 | 468 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 /** | 510 /** |
| 524 * Retrieves a setting value stored in backend. | 511 * Retrieves a setting value stored in backend. |
| 525 */ | 512 */ |
| 526 devtools.InspectorController.prototype.setting = | 513 devtools.InspectorController.prototype.setting = |
| 527 function(setting) { | 514 function(setting) { |
| 528 return this.settings_[setting]; | 515 return this.settings_[setting]; |
| 529 }; | 516 }; |
| 530 | 517 |
| 531 | 518 |
| 532 var InspectorController = new devtools.InspectorController(); | 519 var InspectorController = new devtools.InspectorController(); |
| OLD | NEW |