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

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

Issue 1016623002: [Webapp Refactor] Reparent the ConnectedView into the delegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Baseline Created 5 years, 9 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: remoting/webapp/base/js/protocol_extension.js
diff --git a/remoting/webapp/base/js/protocol_extension.js b/remoting/webapp/base/js/protocol_extension.js
index d7451723509ba9819c769a0991ac612cf520f006..28103f76fda01da32ef23ed7cb2f2e5ee5688c8c 100644
--- a/remoting/webapp/base/js/protocol_extension.js
+++ b/remoting/webapp/base/js/protocol_extension.js
@@ -21,12 +21,12 @@ var remoting = remoting || {};
remoting.ProtocolExtension = function() {};
/**
- * The string that identifies the type of the extension.
- * All extension messages with this type will be sent to the extension.
+ * Return a list of the extension message types that this class can handle.
+ * All extension messages that match these types will be sent to the extension.
*
- * @return {string}
+ * @return {Array<string>}
*/
-remoting.ProtocolExtension.prototype.getType = function() {};
+remoting.ProtocolExtension.prototype.getExtensionTypes = function() {};
/**
* Called when the connection has been established to start the extension.
@@ -34,13 +34,15 @@ remoting.ProtocolExtension.prototype.getType = function() {};
* @param {function(string,string)} sendMessageToHost Callback to send a message
* to the host.
*/
-remoting.ProtocolExtension.prototype.start =
+remoting.ProtocolExtension.prototype.startExtension =
function(sendMessageToHost) {};
/**
* Called when an extension message of a matching type is received.
*
- * @param {string} message
+ * @param {string} type The message type.
+ * @param {Object} message The parsed extension message data.
+ * @return {boolean} True if the extension message was handled.
*/
-remoting.ProtocolExtension.prototype.onMessage =
- function(message) {};
+remoting.ProtocolExtension.prototype.onExtensionMessage =
+ function(type, message) {};

Powered by Google App Engine
This is Rietveld 408576698