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

Side by Side Diff: Source/devtools/front_end/Main.js

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 event.preventDefault(); 610 event.preventDefault();
611 }, 611 },
612 612
613 _inspectNodeRequested: function(event) 613 _inspectNodeRequested: function(event)
614 { 614 {
615 this._updateFocusedNode(event.data); 615 this._updateFocusedNode(event.data);
616 }, 616 },
617 617
618 _updateFocusedNode: function(nodeId) 618 _updateFocusedNode: function(nodeId)
619 { 619 {
620 var node = WebInspector.domAgent.nodeForId(nodeId); 620 var node = WebInspector.domModel.nodeForId(nodeId);
621 console.assert(node); 621 console.assert(node);
622 WebInspector.Revealer.reveal(node); 622 WebInspector.Revealer.reveal(node);
623 }, 623 },
624 624
625 _addMainEventListeners: function(doc) 625 _addMainEventListeners: function(doc)
626 { 626 {
627 doc.addEventListener("keydown", this._postDocumentKeyDown.bind(this), fa lse); 627 doc.addEventListener("keydown", this._postDocumentKeyDown.bind(this), fa lse);
628 doc.addEventListener("beforecopy", this._documentCanCopy.bind(this), tru e); 628 doc.addEventListener("beforecopy", this._documentCanCopy.bind(this), tru e);
629 doc.addEventListener("copy", this._documentCopy.bind(this), false); 629 doc.addEventListener("copy", this._documentCopy.bind(this), false);
630 doc.addEventListener("contextmenu", this._contextMenuEventFired.bind(thi s), true); 630 doc.addEventListener("contextmenu", this._contextMenuEventFired.bind(thi s), true);
(...skipping 12 matching lines...) Expand all
643 object.pushNodeToFrontend(callback); 643 object.pushNodeToFrontend(callback);
644 var elementsPanel = /** @type {!WebInspector.ElementsPanel} */ (WebI nspector.inspectorView.panel("elements")); 644 var elementsPanel = /** @type {!WebInspector.ElementsPanel} */ (WebI nspector.inspectorView.panel("elements"));
645 elementsPanel.omitDefaultSelection(); 645 elementsPanel.omitDefaultSelection();
646 WebInspector.inspectorView.setCurrentPanel(elementsPanel); 646 WebInspector.inspectorView.setCurrentPanel(elementsPanel);
647 return; 647 return;
648 } 648 }
649 649
650 function callback(nodeId) 650 function callback(nodeId)
651 { 651 {
652 elementsPanel.stopOmittingDefaultSelection(); 652 elementsPanel.stopOmittingDefaultSelection();
653 WebInspector.Revealer.reveal(WebInspector.domAgent.nodeForId(nodeId) ); 653 WebInspector.Revealer.reveal(WebInspector.domModel.nodeForId(nodeId) );
654 if (!WebInspector.inspectorView.drawerVisible() && !WebInspector._no tFirstInspectElement) 654 if (!WebInspector.inspectorView.drawerVisible() && !WebInspector._no tFirstInspectElement)
655 InspectorFrontendHost.inspectElementCompleted(); 655 InspectorFrontendHost.inspectElementCompleted();
656 WebInspector._notFirstInspectElement = true; 656 WebInspector._notFirstInspectElement = true;
657 object.release(); 657 object.release();
658 } 658 }
659 659
660 if (object.type === "function") { 660 if (object.type === "function") {
661 /** 661 /**
662 * @param {?Protocol.Error} error 662 * @param {?Protocol.Error} error
663 * @param {!DebuggerAgent.FunctionDetails} response 663 * @param {!DebuggerAgent.FunctionDetails} response
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 721
722 WebInspector.reload = function() 722 WebInspector.reload = function()
723 { 723 {
724 InspectorAgent.reset(); 724 InspectorAgent.reset();
725 window.location.reload(); 725 window.location.reload();
726 } 726 }
727 727
728 new WebInspector.Main(); 728 new WebInspector.Main();
729 729
730 window.DEBUG = true; 730 window.DEBUG = true;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/LayersPanel.js ('k') | Source/devtools/front_end/MetricsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698