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

Side by Side Diff: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js

Issue 341803002: DevTools: Support properly multiple targets in sources panel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 years, 6 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 /* 1 /*
2 * Copyright (C) IBM Corp. 2009 All rights reserved. 2 * Copyright (C) IBM Corp. 2009 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 refreshButton.title = WebInspector.UIString("Refresh"); 45 refreshButton.title = WebInspector.UIString("Refresh");
46 this.titleElement.appendChild(refreshButton); 46 this.titleElement.appendChild(refreshButton);
47 47
48 var addButton = document.createElement("button"); 48 var addButton = document.createElement("button");
49 addButton.className = "pane-title-button add"; 49 addButton.className = "pane-title-button add";
50 addButton.addEventListener("click", this._addButtonClicked.bind(this), false ); 50 addButton.addEventListener("click", this._addButtonClicked.bind(this), false );
51 this.titleElement.appendChild(addButton); 51 this.titleElement.appendChild(addButton);
52 addButton.title = WebInspector.UIString("Add watch expression"); 52 addButton.title = WebInspector.UIString("Add watch expression");
53 53
54 this._requiresUpdate = true; 54 this._requiresUpdate = true;
55 WebInspector.context.addFlavorChangeListener(WebInspector.ExecutionContext , this.refreshExpressions, this);
55 } 56 }
56 57
57 WebInspector.WatchExpressionsSidebarPane.prototype = { 58 WebInspector.WatchExpressionsSidebarPane.prototype = {
58 wasShown: function() 59 wasShown: function()
59 { 60 {
60 this._refreshExpressionsIfNeeded(); 61 this._refreshExpressionsIfNeeded();
61 }, 62 },
62 63
63 reset: function()
64 {
65 this.refreshExpressions();
66 },
67
68 refreshExpressions: function() 64 refreshExpressions: function()
69 { 65 {
70 this._requiresUpdate = true; 66 this._requiresUpdate = true;
71 this._refreshExpressionsIfNeeded(); 67 this._refreshExpressionsIfNeeded();
72 }, 68 },
73 69
74 addExpression: function(expression) 70 addExpression: function(expression)
75 { 71 {
76 this.section.addExpression(expression); 72 this.section.addExpression(expression);
77 this.expand(); 73 this.expand();
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 }, 509 },
514 510
515 oncollapse: function() 511 oncollapse: function()
516 { 512 {
517 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this); 513 WebInspector.ObjectPropertyTreeElement.prototype.oncollapse.call(this);
518 delete this.treeOutline.section._expandedProperties[this.propertyPath()] ; 514 delete this.treeOutline.section._expandedProperties[this.propertyPath()] ;
519 }, 515 },
520 516
521 __proto__: WebInspector.ObjectPropertyTreeElement.prototype 517 __proto__: WebInspector.ObjectPropertyTreeElement.prototype
522 } 518 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698