Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(809)

Side by Side Diff: webkit/glue/devtools/js/debugger_agent.js

Issue 159135: DevTools Profiler: small UI improvements.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 Provides communication interface to remote v8 debugger. See 6 * @fileoverview Provides communication interface to remote v8 debugger. See
7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol 7 * protocol decription at http://code.google.com/p/v8/wiki/DebuggerProtocol
8 */ 8 */
9 goog.provide('devtools.DebuggerAgent'); 9 goog.provide('devtools.DebuggerAgent');
10 10
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 }; 493 };
494 }; 494 };
495 495
496 496
497 /** 497 /**
498 * Sets up callbacks that deal with profiles processing. 498 * Sets up callbacks that deal with profiles processing.
499 */ 499 */
500 devtools.DebuggerAgent.prototype.setupProfilerProcessorCallbacks = function() { 500 devtools.DebuggerAgent.prototype.setupProfilerProcessorCallbacks = function() {
501 // A temporary icon indicating that the profile is being processed. 501 // A temporary icon indicating that the profile is being processed.
502 var processingIcon = new WebInspector.SidebarTreeElement( 502 var processingIcon = new WebInspector.SidebarTreeElement(
503 "profile-sidebar-tree-item", "Processing...", "", null, false); 503 'profile-sidebar-tree-item', 'Processing...', '', null, false);
504 var profilesSidebar = WebInspector.panels.profiles.sidebarTree; 504 var profilesSidebar = WebInspector.panels.profiles.sidebarTree;
505 505
506 this.profilerProcessor_.setCallbacks( 506 this.profilerProcessor_.setCallbacks(
507 function onProfileProcessingStarted() { 507 function onProfileProcessingStarted() {
508 // Set visually empty string. Subtitle hiding is done via styles
509 // manipulation which doesn't play well with dynamic append / removal.
510 processingIcon.subtitle = ' ';
508 profilesSidebar.appendChild(processingIcon); 511 profilesSidebar.appendChild(processingIcon);
509 }, 512 },
513 function onProfileProcessingStatus(ticksCount) {
514 processingIcon.subtitle = ticksCount + ' ticks processed';
515 },
510 function onProfileProcessingFinished(profile) { 516 function onProfileProcessingFinished(profile) {
511 profilesSidebar.removeChild(processingIcon); 517 profilesSidebar.removeChild(processingIcon);
512 WebInspector.addProfile(profile); 518 WebInspector.addProfile(profile);
519 // If no profile is currently shown, show the new one.
520 var profilesPanel = WebInspector.panels.profiles;
521 if (!profilesPanel.visibleView) {
522 profilesPanel.showProfile(profile);
523 }
513 } 524 }
514 ); 525 );
515 }; 526 };
516 527
517 528
518 /** 529 /**
519 * Initializes profiling state. 530 * Initializes profiling state.
520 */ 531 */
521 devtools.DebuggerAgent.prototype.initializeProfiling = function() { 532 devtools.DebuggerAgent.prototype.initializeProfiling = function() {
522 this.setupProfilerProcessorCallbacks(); 533 this.setupProfilerProcessorCallbacks();
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 1445
1435 1446
1436 /** 1447 /**
1437 * @param {number} handle Object handle. 1448 * @param {number} handle Object handle.
1438 * @return {?Object} Returns the object with the handle if it was sent in this 1449 * @return {?Object} Returns the object with the handle if it was sent in this
1439 * message(some objects referenced by handles may be missing in the message). 1450 * message(some objects referenced by handles may be missing in the message).
1440 */ 1451 */
1441 devtools.DebuggerMessage.prototype.lookup = function(handle) { 1452 devtools.DebuggerMessage.prototype.lookup = function(handle) {
1442 return this.refs_[handle]; 1453 return this.refs_[handle];
1443 }; 1454 };
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/devtools/js/profiler_processor.js » ('j') | webkit/glue/devtools/js/profiler_processor.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698