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

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

Issue 100332: DevTools: Implement search in scripts. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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
« no previous file with comments | « no previous file | webkit/glue/devtools/js/inspector_controller_impl.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 netAgent.getResourceContentAsync(identifier, function(source) { 414 netAgent.getResourceContentAsync(identifier, function(source) {
415 var resource = netAgent.getResource(identifier); 415 var resource = netAgent.getResource(identifier);
416 if (InspectorController.addSourceToFrame(resource.mimeType, source, 416 if (InspectorController.addSourceToFrame(resource.mimeType, source,
417 element)) { 417 element)) {
418 delete self._frameNeedsSetup; 418 delete self._frameNeedsSetup;
419 if (resource.type === WebInspector.Resource.Type.Script) { 419 if (resource.type === WebInspector.Resource.Type.Script) {
420 self.sourceFrame.addEventListener('syntax highlighting complete', 420 self.sourceFrame.addEventListener('syntax highlighting complete',
421 self._syntaxHighlightingComplete, self); 421 self._syntaxHighlightingComplete, self);
422 self.sourceFrame.syntaxHighlightJavascript(); 422 self.sourceFrame.syntaxHighlightJavascript();
423 } else {
424 self._sourceFrameSetupFinished();
423 } 425 }
424 } else {
425 self._sourceFrameSetupFinished();
426 } 426 }
427 }); 427 });
428 return true; 428 return true;
429 }; 429 };
430 430
431 431
432 /** 432 /**
433 * Dummy object used during properties inspection. 433 * Dummy object used during properties inspection.
434 * @see WebInspector.didGetNodePropertiesAsync_ 434 * @see WebInspector.didGetNodePropertiesAsync_
435 */ 435 */
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 function() { 586 function() {
587 if (updateInterface) { 587 if (updateInterface) {
588 WebInspector.panels.elements.sidebarPanes.styles.needsUpdate = true; 588 WebInspector.panels.elements.sidebarPanes.styles.needsUpdate = true;
589 WebInspector.panels.elements.updateStyles(true); 589 WebInspector.panels.elements.updateStyles(true);
590 } 590 }
591 }); 591 });
592 }; 592 };
593 593
594 594
595 /** 595 /**
596 * This function overrides standard searchableViews getters to perform search
597 * only in the current view (other views are loaded asynchronously, no way to
598 * search them yet).
599 */
600 WebInspector.searchableViews_ = function() {
601 var views = [];
602 const visibleView = this.visibleView;
603 if (visibleView && visibleView.performSearch) {
604 views.push(visibleView);
605 }
606 return views;
607 };
608
609
610 /**
611 * @override
612 */
613 WebInspector.ResourcesPanel.prototype.__defineGetter__(
614 'searchableViews',
615 WebInspector.searchableViews_);
616
617
618 /**
619 * @override
620 */
621 WebInspector.ScriptsPanel.prototype.__defineGetter__(
622 'searchableViews',
623 WebInspector.searchableViews_);
624
625
626 /**
596 * @override 627 * @override
597 */ 628 */
598 WebInspector.Console.prototype._evalInInspectedWindow = function(expression) { 629 WebInspector.Console.prototype._evalInInspectedWindow = function(expression) {
599 if (WebInspector.panels.scripts.paused) 630 if (WebInspector.panels.scripts.paused)
600 return WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression); 631 return WebInspector.panels.scripts.evaluateInSelectedCallFrame(expression);
601 632
602 var console = this; 633 var console = this;
603 devtools.tools.evaluateJavaScript(expression, function(response) { 634 devtools.tools.evaluateJavaScript(expression, function(response) {
604 // TODO(yurys): send exception information along with the response 635 // TODO(yurys): send exception information along with the response
605 var exception = false; 636 var exception = false;
606 console.addMessage(new WebInspector.ConsoleCommandResult( 637 console.addMessage(new WebInspector.ConsoleCommandResult(
607 response, exception, null /* commandMessage */)); 638 response, exception, null /* commandMessage */));
608 }); 639 });
609 // TODO(yurys): refactor WebInspector.Console so that the result is added into 640 // TODO(yurys): refactor WebInspector.Console so that the result is added into
610 // the command log message. 641 // the command log message.
611 return 'evaluating...'; 642 return 'evaluating...';
612 }; 643 };
OLDNEW
« no previous file with comments | « no previous file | webkit/glue/devtools/js/inspector_controller_impl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698