Index: chrome/browser/resources/gaia_auth/background.js |
diff --git a/chrome/browser/resources/gaia_auth/background.js b/chrome/browser/resources/gaia_auth/background.js |
index 4de43a1f956806a951d9dca868c1d7bda9c241a8..1a3f7acb726272cec75a0d1c273187d2b1747619 100644 |
--- a/chrome/browser/resources/gaia_auth/background.js |
+++ b/chrome/browser/resources/gaia_auth/background.js |
@@ -163,6 +163,8 @@ BackgroundBridge.prototype = { |
this.channelMain_.registerMessage( |
'getScrapedPasswords', |
this.onGetScrapedPasswords_.bind(this)); |
+ this.channelMain_.registerMessage( |
+ 'apiResponse', this.onAPIResponse_.bind(this)); |
this.channelMain_.send({ |
'name': 'channelConnected' |
@@ -341,6 +343,14 @@ BackgroundBridge.prototype = { |
return Object.keys(passwords); |
}, |
+ /** |
+ * Handler for 'apiResponse' signal sent from the main script. Passes on the |
+ * |msg| to the injected script. |
+ */ |
+ onAPIResponse_: function(msg) { |
+ this.channelInjected_.send(msg); |
+ }, |
+ |
onAPICall_: function(msg) { |
this.channelMain_.send(msg); |
}, |