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

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

Issue 2855963002: DevTools: appropriately hide the source map infobar (Closed)
Patch Set: Created 3 years, 7 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 | 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) 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 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 newScriptFile.addEventListener(Bindings.ResourceScriptFile.Events.DidDiverge FromVM, this._didDivergeFromVM, this); 1240 newScriptFile.addEventListener(Bindings.ResourceScriptFile.Events.DidDiverge FromVM, this._didDivergeFromVM, this);
1241 if (this.loaded) 1241 if (this.loaded)
1242 newScriptFile.checkMapping(); 1242 newScriptFile.checkMapping();
1243 this._showSourceMapInfobar(newScriptFile.hasSourceMapURL()); 1243 this._showSourceMapInfobar(newScriptFile.hasSourceMapURL());
1244 } 1244 }
1245 1245
1246 /** 1246 /**
1247 * @param {boolean} show 1247 * @param {boolean} show
1248 */ 1248 */
1249 _showSourceMapInfobar(show) { 1249 _showSourceMapInfobar(show) {
1250 if (this._sourceMapInfobar) { 1250 if (!show) {
1251 if (!show) { 1251 if (this._sourceMapInfobar) {
1252 this._sourceMapInfobar.dispose(); 1252 this._sourceMapInfobar.dispose();
1253 delete this._sourceMapInfobar; 1253 delete this._sourceMapInfobar;
1254 } 1254 }
1255 return; 1255 return;
1256 } 1256 }
1257 if (this._sourceMapInfobar)
1258 return;
1257 this._sourceMapInfobar = UI.Infobar.create( 1259 this._sourceMapInfobar = UI.Infobar.create(
1258 UI.Infobar.Type.Info, Common.UIString('Source Map detected.'), 1260 UI.Infobar.Type.Info, Common.UIString('Source Map detected.'),
1259 Common.settings.createSetting('sourceMapInfobarDisabled', false)); 1261 Common.settings.createSetting('sourceMapInfobarDisabled', false));
1260 if (this._sourceMapInfobar) { 1262 if (this._sourceMapInfobar) {
1261 this._sourceMapInfobar.createDetailsRowMessage(Common.UIString( 1263 this._sourceMapInfobar.createDetailsRowMessage(Common.UIString(
1262 'Associated files should be added to the file tree. You can debug thes e resolved source files as regular JavaScript files.')); 1264 'Associated files should be added to the file tree. You can debug thes e resolved source files as regular JavaScript files.'));
1263 this._sourceMapInfobar.createDetailsRowMessage(Common.UIString( 1265 this._sourceMapInfobar.createDetailsRowMessage(Common.UIString(
1264 'Associated files are available via file tree or %s.', 1266 'Associated files are available via file tree or %s.',
1265 UI.shortcutRegistry.shortcutTitleForAction('quickOpen.show'))); 1267 UI.shortcutRegistry.shortcutTitleForAction('quickOpen.show')));
1266 this._sourceMapInfobar.setCloseCallback(() => delete this._sourceMapInfoba r); 1268 this._sourceMapInfobar.setCloseCallback(() => delete this._sourceMapInfoba r);
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1527 return; 1529 return;
1528 this.bookmark.clear(); 1530 this.bookmark.clear();
1529 this.bookmark = null; 1531 this.bookmark = null;
1530 } 1532 }
1531 }; 1533 };
1532 1534
1533 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark'); 1535 Sources.JavaScriptSourceFrame.BreakpointDecoration.bookmarkSymbol = Symbol('book mark');
1534 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element'); 1536 Sources.JavaScriptSourceFrame.BreakpointDecoration._elementSymbolForTest = Symbo l('element');
1535 1537
1536 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark'); 1538 Sources.JavaScriptSourceFrame.continueToLocationDecorationSymbol = Symbol('bookm ark');
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