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

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

Issue 2269183003: DevTools: Merge CodeMirrorTextEditor's copyRange into text (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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 | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 * @override 200 * @override
201 * @param {!WebInspector.Context} context 201 * @param {!WebInspector.Context} context
202 * @param {string} actionId 202 * @param {string} actionId
203 * @return {boolean} 203 * @return {boolean}
204 */ 204 */
205 handleAction: function(context, actionId) 205 handleAction: function(context, actionId)
206 { 206 {
207 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFrame); 207 var frame = WebInspector.context.flavor(WebInspector.UISourceCodeFrame);
208 if (!frame) 208 if (!frame)
209 return false; 209 return false;
210 var text = frame.textEditor.copyRange(frame.textEditor.selection()); 210 var text = frame.textEditor.text(frame.textEditor.selection());
211 WebInspector.viewManager.showView("sources.watch"); 211 WebInspector.viewManager.showView("sources.watch");
212 this.doUpdate(); 212 this.doUpdate();
213 this._createWatchExpression(text); 213 this._createWatchExpression(text);
214 this._saveExpressions(); 214 this._saveExpressions();
215 return true; 215 return true;
216 }, 216 },
217 217
218 /** 218 /**
219 * @override 219 * @override
220 * @param {!Event} event 220 * @param {!Event} event
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 contextMenu.appendApplicableItems(this._result); 450 contextMenu.appendApplicableItems(this._result);
451 }, 451 },
452 452
453 _copyValueButtonClicked: function() 453 _copyValueButtonClicked: function()
454 { 454 {
455 InspectorFrontendHost.copyText(this._valueElement.textContent); 455 InspectorFrontendHost.copyText(this._valueElement.textContent);
456 }, 456 },
457 457
458 __proto__: WebInspector.Object.prototype 458 __proto__: WebInspector.Object.prototype
459 } 459 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698