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

Unified Diff: chrome/browser/resources/options/hotword_search_setting_indicator.js

Issue 289063012: [Hotword] Add error message display back in. Add error messages for NaCl. Add metrics for errors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compile error Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/hotword_search_setting_indicator.js
diff --git a/chrome/browser/resources/options/hotword_search_setting_indicator.js b/chrome/browser/resources/options/hotword_search_setting_indicator.js
index e51b17274dcd5424211f55c1ce851c121af4f2e6..035a1d317abd667f319e0d852088cb0bd415d9f8 100644
--- a/chrome/browser/resources/options/hotword_search_setting_indicator.js
+++ b/chrome/browser/resources/options/hotword_search_setting_indicator.js
@@ -61,6 +61,14 @@ cr.define('options', function() {
},
/**
+ * Assigns a value to the help link variable.
+ * @param {string} helpLink The text that links to a troubleshooting page.
+ */
+ set helpLink(helpLinkText) {
+ this.helpLink_ = helpLinkText;
+ },
+
+ /**
* Toggles showing and hiding the error message bubble. An empty
* |errorText_| indicates that there is no error message. So the bubble
* only be shown if |errorText_| has a value.
@@ -76,44 +84,28 @@ cr.define('options', function() {
var self = this;
// Create the DOM tree for the bubble content.
- var action = document.createElement('button');
- action.classList.add('default-button');
- action.classList.add('controlled-setting-bubble-action');
- action.textContent = loadTimeData.getString('hotwordRetryDownloadButton');
- action.addEventListener('click', function(event) {
- self.retryDownload_();
- });
-
- var buttonStrip = document.createElement('div');
- buttonStrip.classList.add('button-strip');
- buttonStrip.reversed = true;
- buttonStrip.appendChild(action);
-
- var actionContainer = document.createElement('div');
- actionContainer.classList.add('action-area');
- actionContainer.appendChild(buttonStrip);
-
var closeButton = document.createElement('div');
closeButton.classList.add('close-button');
var text = document.createElement('p');
- text.textContent = this.errorText_;
+ text.innerHTML = this.errorText_;
+
+ var help = document.createElement('p');
+ help.innerHTML = this.helpLink_;
+
+ var textDiv = document.createElement('div');
+ textDiv.appendChild(text);
+ textDiv.appendChild(help);
var container = document.createElement('div');
container.appendChild(closeButton);
- container.appendChild(text);
- container.appendChild(actionContainer);
+ container.appendChild(textDiv);
var content = document.createElement('div');
content.appendChild(container);
OptionsPage.showBubble(content, this.image, this, this.location);
},
-
- retryDownload_: function() {
- chrome.send('requestHotwordSetupRetry');
- OptionsPage.hideBubble();
- },
};
// Export

Powered by Google App Engine
This is Rietveld 408576698