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

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

Issue 1192813002: DevTools: do no throw exception in "add watch" context menu item (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | 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) 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 _refreshExpressionsIfNeeded: function() 100 _refreshExpressionsIfNeeded: function()
101 { 101 {
102 if (this._requiresUpdate && this.isShowing()) { 102 if (this._requiresUpdate && this.isShowing()) {
103 this._rebuildWatchExpressions(); 103 this._rebuildWatchExpressions();
104 delete this._requiresUpdate; 104 delete this._requiresUpdate;
105 } else 105 } else
106 this._requiresUpdate = true; 106 this._requiresUpdate = true;
107 }, 107 },
108 108
109 /** 109 /**
110 * @param {!WebInspector.Event} event 110 * @param {!WebInspector.Event=} event
111 */ 111 */
112 _addButtonClicked: function(event) 112 _addButtonClicked: function(event)
113 { 113 {
114 event.consume(true); 114 if (event)
115 event.consume(true);
115 this.expand(); 116 this.expand();
116 this._createWatchExpression(null).startEditing(); 117 this._createWatchExpression(null).startEditing();
117 }, 118 },
118 119
119 /** 120 /**
120 * @param {!WebInspector.Event} event 121 * @param {!WebInspector.Event} event
121 */ 122 */
122 _refreshButtonClicked: function(event) 123 _refreshButtonClicked: function(event)
123 { 124 {
124 event.consume(); 125 event.consume();
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 contextMenu.appendApplicableItems(this._result); 424 contextMenu.appendApplicableItems(this._result);
424 }, 425 },
425 426
426 _copyValueButtonClicked: function() 427 _copyValueButtonClicked: function()
427 { 428 {
428 InspectorFrontendHost.copyText(this._valueElement.textContent); 429 InspectorFrontendHost.copyText(this._valueElement.textContent);
429 }, 430 },
430 431
431 __proto__: WebInspector.Object.prototype 432 __proto__: WebInspector.Object.prototype
432 } 433 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698