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

Side by Side Diff: Source/devtools/front_end/DOMBreakpointsSidebarPane.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
« no previous file with comments | « Source/devtools/front_end/DOMAgent.js ('k') | Source/devtools/front_end/DOMModel.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 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 this._breakpointTypeLabels[this._breakpointTypes.SubtreeModified] = WebInspe ctor.UIString("Subtree Modified"); 47 this._breakpointTypeLabels[this._breakpointTypes.SubtreeModified] = WebInspe ctor.UIString("Subtree Modified");
48 this._breakpointTypeLabels[this._breakpointTypes.AttributeModified] = WebIns pector.UIString("Attribute Modified"); 48 this._breakpointTypeLabels[this._breakpointTypes.AttributeModified] = WebIns pector.UIString("Attribute Modified");
49 this._breakpointTypeLabels[this._breakpointTypes.NodeRemoved] = WebInspector .UIString("Node Removed"); 49 this._breakpointTypeLabels[this._breakpointTypes.NodeRemoved] = WebInspector .UIString("Node Removed");
50 50
51 this._contextMenuLabels = {}; 51 this._contextMenuLabels = {};
52 this._contextMenuLabels[this._breakpointTypes.SubtreeModified] = WebInspecto r.UIString(WebInspector.useLowerCaseMenuTitles() ? "Subtree modifications" : "Su btree Modifications"); 52 this._contextMenuLabels[this._breakpointTypes.SubtreeModified] = WebInspecto r.UIString(WebInspector.useLowerCaseMenuTitles() ? "Subtree modifications" : "Su btree Modifications");
53 this._contextMenuLabels[this._breakpointTypes.AttributeModified] = WebInspec tor.UIString(WebInspector.useLowerCaseMenuTitles() ? "Attributes modifications" : "Attributes Modifications"); 53 this._contextMenuLabels[this._breakpointTypes.AttributeModified] = WebInspec tor.UIString(WebInspector.useLowerCaseMenuTitles() ? "Attributes modifications" : "Attributes Modifications");
54 this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UI String(WebInspector.useLowerCaseMenuTitles() ? "Node removal" : "Node Removal"); 54 this._contextMenuLabels[this._breakpointTypes.NodeRemoved] = WebInspector.UI String(WebInspector.useLowerCaseMenuTitles() ? "Node removal" : "Node Removal");
55 55
56 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.InspectedURLChanged, this._inspectedURLChanged, this); 56 WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeMod el.EventTypes.InspectedURLChanged, this._inspectedURLChanged, this);
57 WebInspector.domAgent.addEventListener(WebInspector.DOMAgent.Events.NodeRemo ved, this._nodeRemoved, this); 57 WebInspector.domModel.addEventListener(WebInspector.DOMModel.Events.NodeRemo ved, this._nodeRemoved, this);
58 } 58 }
59 59
60 WebInspector.DOMBreakpointsSidebarPane.prototype = { 60 WebInspector.DOMBreakpointsSidebarPane.prototype = {
61 _inspectedURLChanged: function(event) 61 _inspectedURLChanged: function(event)
62 { 62 {
63 this._breakpointElements = {}; 63 this._breakpointElements = {};
64 this._reset(); 64 this._reset();
65 var url = /** @type {string} */ (event.data); 65 var url = /** @type {string} */ (event.data);
66 this._inspectedURL = url.removeURLFragment(); 66 this._inspectedURL = url.removeURLFragment();
67 }, 67 },
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 { 321 {
322 var pathToBreakpoints = {}; 322 var pathToBreakpoints = {};
323 323
324 /** 324 /**
325 * @param {string} path 325 * @param {string} path
326 * @param {?DOMAgent.NodeId} nodeId 326 * @param {?DOMAgent.NodeId} nodeId
327 * @this {WebInspector.DOMBreakpointsSidebarPane} 327 * @this {WebInspector.DOMBreakpointsSidebarPane}
328 */ 328 */
329 function didPushNodeByPathToFrontend(path, nodeId) 329 function didPushNodeByPathToFrontend(path, nodeId)
330 { 330 {
331 var node = nodeId ? WebInspector.domAgent.nodeForId(nodeId) : null; 331 var node = nodeId ? WebInspector.domModel.nodeForId(nodeId) : null;
332 if (!node) 332 if (!node)
333 return; 333 return;
334 334
335 var breakpoints = pathToBreakpoints[path]; 335 var breakpoints = pathToBreakpoints[path];
336 for (var i = 0; i < breakpoints.length; ++i) 336 for (var i = 0; i < breakpoints.length; ++i)
337 this._setBreakpoint(node, breakpoints[i].type, breakpoints[i].en abled); 337 this._setBreakpoint(node, breakpoints[i].type, breakpoints[i].en abled);
338 } 338 }
339 339
340 var breakpoints = WebInspector.settings.domBreakpoints.get(); 340 var breakpoints = WebInspector.settings.domBreakpoints.get();
341 for (var i = 0; i < breakpoints.length; ++i) { 341 for (var i = 0; i < breakpoints.length; ++i) {
342 var breakpoint = breakpoints[i]; 342 var breakpoint = breakpoints[i];
343 if (breakpoint.url !== this._inspectedURL) 343 if (breakpoint.url !== this._inspectedURL)
344 continue; 344 continue;
345 var path = breakpoint.path; 345 var path = breakpoint.path;
346 if (!pathToBreakpoints[path]) { 346 if (!pathToBreakpoints[path]) {
347 pathToBreakpoints[path] = []; 347 pathToBreakpoints[path] = [];
348 WebInspector.domAgent.pushNodeByPathToFrontend(path, didPushNode ByPathToFrontend.bind(this, path)); 348 WebInspector.domModel.pushNodeByPathToFrontend(path, didPushNode ByPathToFrontend.bind(this, path));
349 } 349 }
350 pathToBreakpoints[path].push(breakpoint); 350 pathToBreakpoints[path].push(breakpoint);
351 } 351 }
352 }, 352 },
353 353
354 /** 354 /**
355 * @param {!WebInspector.Panel} panel 355 * @param {!WebInspector.Panel} panel
356 * @return {!WebInspector.DOMBreakpointsSidebarPane.Proxy} 356 * @return {!WebInspector.DOMBreakpointsSidebarPane.Proxy}
357 */ 357 */
358 createProxy: function(panel) 358 createProxy: function(panel)
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 this.element.appendChild(this.bodyElement); 419 this.element.appendChild(this.bodyElement);
420 }, 420 },
421 421
422 __proto__: WebInspector.SidebarPane.prototype 422 __proto__: WebInspector.SidebarPane.prototype
423 } 423 }
424 424
425 /** 425 /**
426 * @type {!WebInspector.DOMBreakpointsSidebarPane} 426 * @type {!WebInspector.DOMBreakpointsSidebarPane}
427 */ 427 */
428 WebInspector.domBreakpointsSidebarPane; 428 WebInspector.domBreakpointsSidebarPane;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/DOMAgent.js ('k') | Source/devtools/front_end/DOMModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698