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

Unified Diff: remoting/webapp/crd/js/client_session.js

Issue 1070223003: [Webapp Refactor] Remove remoting.js. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reviewer's feedback 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
« no previous file with comments | « remoting/webapp/base/js/base.js ('k') | remoting/webapp/crd/js/feedback.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/client_session.js
diff --git a/remoting/webapp/crd/js/client_session.js b/remoting/webapp/crd/js/client_session.js
index 43a99bede36811411463dc09bed6ddd01013e850..0b1239fa345c2d88f80c9873e432441c791f0be9 100644
--- a/remoting/webapp/crd/js/client_session.js
+++ b/remoting/webapp/crd/js/client_session.js
@@ -57,7 +57,10 @@ remoting.ClientSession = function(plugin, host, signalStrategy) {
remoting.SignalStrategy.State.CONNECTED);
this.signalStrategy_.setIncomingStanzaCallback(
this.onIncomingMessage_.bind(this));
- remoting.formatIq.setJids(this.signalStrategy_.getJid(), host.jabberId);
+
+ /** @private */
+ this.iqFormatter_ =
+ new remoting.FormatIq(this.signalStrategy_.getJid(), host.jabberId);
/**
* Allow host-offline error reporting to be suppressed in situations where it
@@ -366,7 +369,7 @@ remoting.ClientSession.prototype.sendIq_ = function(message) {
}
}
- console.log(remoting.timestamp(), remoting.formatIq.prettifySendIq(message));
+ console.log(base.timestamp() + this.iqFormatter_.prettifySendIq(message));
if (this.signalStrategy_.getState() !=
remoting.SignalStrategy.State.CONNECTED) {
console.log("Message above is dropped because signaling is not connected.");
@@ -399,8 +402,8 @@ remoting.ClientSession.prototype.onIncomingMessage_ = function(message) {
return;
}
var formatted = new XMLSerializer().serializeToString(message);
- console.log(remoting.timestamp(),
- remoting.formatIq.prettifyReceiveIq(formatted));
+ console.log(base.timestamp() +
+ this.iqFormatter_.prettifyReceiveIq(formatted));
this.plugin_.onIncomingIq(formatted);
};
« no previous file with comments | « remoting/webapp/base/js/base.js ('k') | remoting/webapp/crd/js/feedback.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698