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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js

Issue 2906843002: [Devtools] Move to canReplayRequest in NetworkRequest (Closed)
Patch Set: changes Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 560
561 filterSubMenu.setEnabled(hasFilters || (consoleMessage && consoleMessage.url )); 561 filterSubMenu.setEnabled(hasFilters || (consoleMessage && consoleMessage.url ));
562 unhideAll.setEnabled(hasFilters); 562 unhideAll.setEnabled(hasFilters);
563 563
564 contextMenu.appendSeparator(); 564 contextMenu.appendSeparator();
565 contextMenu.appendAction('console.clear'); 565 contextMenu.appendAction('console.clear');
566 contextMenu.appendAction('console.clear.history'); 566 contextMenu.appendAction('console.clear.history');
567 contextMenu.appendItem(Common.UIString('Save as...'), this._saveConsole.bind (this)); 567 contextMenu.appendItem(Common.UIString('Save as...'), this._saveConsole.bind (this));
568 568
569 var request = consoleMessage ? consoleMessage.request : null; 569 var request = consoleMessage ? consoleMessage.request : null;
570 if (request && request.resourceType() === Common.resourceTypes.XHR) { 570 if (request && SDK.NetworkManager.canReplayRequest(request)) {
571 contextMenu.appendSeparator(); 571 contextMenu.appendSeparator();
572 contextMenu.appendItem(Common.UIString('Replay XHR'), request.replayXHR.bi nd(request)); 572 contextMenu.appendItem(Common.UIString('Replay XHR'), SDK.NetworkManager.r eplayRequest.bind(null, request));
573 } 573 }
574 574
575 contextMenu.show(); 575 contextMenu.show();
576 } 576 }
577 577
578 _saveConsole() { 578 _saveConsole() {
579 var url = SDK.targetManager.mainTarget().inspectedURL(); 579 var url = SDK.targetManager.mainTarget().inspectedURL();
580 var parsedURL = url.asParsedURL(); 580 var parsedURL = url.asParsedURL();
581 var filename = String.sprintf('%s-%d.log', parsedURL ? parsedURL.host : 'con sole', Date.now()); 581 var filename = String.sprintf('%s-%d.log', parsedURL ? parsedURL.host : 'con sole', Date.now());
582 var stream = new Bindings.FileOutputStream(); 582 var stream = new Bindings.FileOutputStream();
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1276 return true; 1276 return true;
1277 } 1277 }
1278 return false; 1278 return false;
1279 } 1279 }
1280 }; 1280 };
1281 1281
1282 /** 1282 /**
1283 * @typedef {{messageIndex: number, matchIndex: number}} 1283 * @typedef {{messageIndex: number, matchIndex: number}}
1284 */ 1284 */
1285 Console.ConsoleView.RegexMatchRange; 1285 Console.ConsoleView.RegexMatchRange;
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698