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

Unified Diff: remoting/webapp/app_remoting/js/app_remoting.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
« no previous file with comments | « no previous file | remoting/webapp/base/js/application.js » ('j') | remoting/webapp/crd/js/desktop_remoting.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/app_remoting/js/app_remoting.js
diff --git a/remoting/webapp/app_remoting/js/app_remoting.js b/remoting/webapp/app_remoting/js/app_remoting.js
index 80bb442749cf84ba9d1e4be77b2178679ab7d39a..03d54683e2952a53c32adc98ef46bb4cfa387c55 100644
--- a/remoting/webapp/app_remoting/js/app_remoting.js
+++ b/remoting/webapp/app_remoting/js/app_remoting.js
@@ -17,6 +17,7 @@ var remoting = remoting || {};
* @param {remoting.Application} app The main app that owns this delegate.
* @constructor
* @implements {remoting.Application.Delegate}
+ * @implements {remoting.ProtocolExtension}
*/
remoting.AppRemoting = function(app) {
app.setDelegate(this);
@@ -232,6 +233,8 @@ remoting.AppRemoting.prototype.handleConnected = function(connectionInfo) {
JSON.stringify({fullName: userInfo.name}));
});
+ remoting.app.getSessionConnector().registerProtocolExtension(this);
+
var clientSession = connectionInfo.session();
// Set up a ping at 10-second intervals to test the connection speed.
var CONNECTION_SPEED_PING_INTERVAL = 10 * 1000;
@@ -276,15 +279,25 @@ remoting.AppRemoting.prototype.handleVideoStreamingStarted = function() {
remoting.LoadingWindow.close();
};
+
+/** @return {Array<string>} */
+remoting.AppRemoting.prototype.getExtensionTypes = function() {
+ return ['openURL', 'onWindowRemoved', 'onWindowAdded',
+ 'onAllWindowsMinimized', 'setKeyboardLayouts', 'pingResponse'];
+};
+
/**
- * Called when an extension message needs to be handled.
- *
- * @param {string} type The type of the extension message.
+ * @param {function(string,string)} sendMessageToHost Callback to send a message
+ * to the host.
+ */
+remoting.AppRemoting.prototype.startExtension = function(sendMessageToHost) {
+};
+
+/**
+ * @param {string} type The message type.
* @param {Object} message The parsed extension message data.
- * @return {boolean} True if the extension message was recognized.
*/
-remoting.AppRemoting.prototype.handleExtensionMessage = function(
- type, message) {
+remoting.AppRemoting.prototype.onExtensionMessage = function(type, message) {
switch (type) {
case 'openURL':
« no previous file with comments | « no previous file | remoting/webapp/base/js/application.js » ('j') | remoting/webapp/crd/js/desktop_remoting.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698