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

Unified Diff: remoting/webapp/feedback.js

Issue 339613003: Remove the blue tool-bar for apps v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made unit-tests side-effect-free. Created 6 years, 5 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
« no previous file with comments | « remoting/webapp/clipboard.js ('k') | remoting/webapp/html/toolbar.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/feedback.js
diff --git a/remoting/webapp/feedback.js b/remoting/webapp/feedback.js
index 74e4ff93628c7aeef51a830b8790cd9b8b0a0c8a..75b32be5c53099903926787c134a7e9c358b4627 100644
--- a/remoting/webapp/feedback.js
+++ b/remoting/webapp/feedback.js
@@ -7,28 +7,28 @@
var remoting = remoting || {};
/**
- * Show or hide the feedback button based on whether or not the current version
- * of Chrome recognizes Chrome Remote Desktop as an authorized feedback source.
+ * Attach appropriate event handlers and show or hide the feedback button based
+ * on whether or not the current version of Chrome recognizes Chrome Remote
+ * Desktop as an authorized feedback source.
*
- * @param {HTMLElement} helpIcon The parent <span> for the help icon and the
- * <ul> containing the help and feedback entries.
- * @param {HTMLElement} helpButton The Help <li> associated with the help icon.
- * @param {HTMLElement} feedbackButton The Feedback <li> associated with the
- * help icon.
- * @constructor
+ * @param {HTMLElement} container The menu containing the help and feedback
+ * items.
*/
-remoting.Feedback = function(helpIcon, helpButton, feedbackButton) {
- var menuButton = new remoting.MenuButton(helpIcon);
+remoting.manageHelpAndFeedback = function(container) {
var showHelp = function() {
window.open('https://www.google.com/support/chrome/bin/answer.py?' +
'answer=1649523');
}
+ var helpButton = container.querySelector('.menu-help');
+ base.debug.assert(helpButton != null);
helpButton.addEventListener('click', showHelp, false);
+ var feedbackButton = container.querySelector('.menu-feedback');
+ base.debug.assert(feedbackButton != null);
var chromeVersion = parseInt(
window.navigator.appVersion.match(/Chrome\/(\d+)\./)[1], 10);
if (chromeVersion >= 35) {
feedbackButton.addEventListener('click',
- this.sendFeedback_.bind(this),
+ remoting.sendFeedback_,
false);
} else {
feedbackButton.hidden = true;
@@ -39,7 +39,7 @@ remoting.Feedback = function(helpIcon, helpButton, feedbackButton) {
* Pass the current version of Chrome Remote Desktop to the Google Feedback
* extension and instruct it to show the feedback dialog.
*/
-remoting.Feedback.prototype.sendFeedback_ = function() {
+remoting.sendFeedback_ = function() {
var message = {
requestFeedback: true,
feedbackInfo: {
« no previous file with comments | « remoting/webapp/clipboard.js ('k') | remoting/webapp/html/toolbar.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698