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

Unified Diff: remoting/webapp/base/js/message_window.js

Issue 883813002: [Chromoting] Fix broken OK/Cancel button in loading window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/base/js/message_window.js
diff --git a/remoting/webapp/base/js/message_window.js b/remoting/webapp/base/js/message_window.js
index 2355b3e5390af93dd4d3bf3d79dbf4c67be84ad3..d80c2053f9407ce7987946e8e595faaa6dc4febc 100644
--- a/remoting/webapp/base/js/message_window.js
+++ b/remoting/webapp/base/js/message_window.js
@@ -21,7 +21,7 @@ function MessageWindowImpl() {
/**
* @param {Window} parentWindow The id of the window that showed the message.
- * @param {string} messageId The identifier of the message, as supplied by the
+ * @param {number} messageId The identifier of the message, as supplied by the
* parent.
* @param {number} result 0 if window was closed without pressing a button;
* otherwise the index of the button pressed (e.g., 1 = primary).
@@ -125,17 +125,15 @@ MessageWindowImpl.prototype.onMessage_ = function(event) {
infoboxDiv.hidden = true;
}
- var messageIdStr = messageId.toString();
-
this.initButton_(
button,
buttonLabel,
- this.sendReply_.bind(this, event.source, messageIdStr, 1));
+ this.sendReply_.bind(this, event.source, messageId, 1));
this.initButton_(
cancelButton,
cancelButtonLabel,
- this.sendReply_.bind(this, event.source, messageIdStr, 0));
+ this.sendReply_.bind(this, event.source, messageId, 0));
var buttonToFocus = (cancelButtonLabel) ? cancelButton : button;
buttonToFocus.focus();
@@ -145,7 +143,7 @@ MessageWindowImpl.prototype.onMessage_ = function(event) {
// Note that when a button is pressed, this will result in sendReply_
// being called multiple times (once for the button, once for close).
chrome.app.window.current().onClosed.addListener(
- this.sendReply_.bind(this, event.source, messageIdStr, 0));
+ this.sendReply_.bind(this, event.source, messageId, 0));
this.updateSize_();
chrome.app.window.current().show();
« 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