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

Unified Diff: chrome/browser/resources/extensions/extension_code.js

Issue 1016413004: [Extensions] Update Error Console UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/extensions/extension_code.js
diff --git a/chrome/browser/resources/extensions/extension_code.js b/chrome/browser/resources/extensions/extension_code.js
index 1e95c88d9ea7ac19a7c8317ddccb83171086015c..255909d6352baaee77c0b2158ea9318387c587c3 100644
--- a/chrome/browser/resources/extensions/extension_code.js
+++ b/chrome/browser/resources/extensions/extension_code.js
@@ -43,19 +43,20 @@ cr.define('extensions', function() {
// Clear any remnant content, so we don't have multiple code listed.
this.clear();
- var sourceDiv = document.createElement('div');
- sourceDiv.classList.add('extension-code-source');
- this.appendChild(sourceDiv);
-
// If there's no code, then display an appropriate message.
if (!code ||
(!code.highlight && !code.beforeHighlight && !code.afterHighlight)) {
var span = document.createElement('span');
+ span.classList.add('extension-code-empty');
span.textContent = emptyMessage;
- sourceDiv.appendChild(span);
+ this.appendChild(span);
return;
}
+ var sourceDiv = document.createElement('div');
+ sourceDiv.classList.add('extension-code-source');
+ this.appendChild(sourceDiv);
+
var lineCount = 0;
var createSpan = function(source, isHighlighted) {
lineCount += source.split('\n').length - 1;
« no previous file with comments | « chrome/browser/extensions/error_console/error_console.cc ('k') | chrome/browser/resources/extensions/extension_error.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698