| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Script to be injected into SAML provider pages, serving three main purposes: | 7 * Script to be injected into SAML provider pages, serving three main purposes: |
| 8 * 1. Signal hosting extension that an external page is loaded so that the | 8 * 1. Signal hosting extension that an external page is loaded so that the |
| 9 * UI around it should be changed accordingly; | 9 * UI around it should be changed accordingly; |
| 10 * 2. Provide an API via which the SAML provider can pass user credentials to | 10 * 2. Provide an API via which the SAML provider can pass user credentials to |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (document.readyState == 'loading') | 200 if (document.readyState == 'loading') |
| 201 return; | 201 return; |
| 202 initPasswordScraper(); | 202 initPasswordScraper(); |
| 203 window.removeEventListener(event.type, listener, true); | 203 window.removeEventListener(event.type, listener, true); |
| 204 }, true); | 204 }, true); |
| 205 } else { | 205 } else { |
| 206 initPasswordScraper(); | 206 initPasswordScraper(); |
| 207 } | 207 } |
| 208 } | 208 } |
| 209 | 209 |
| 210 var channel = new Channel(); | 210 var channel = Channel.create(); |
| 211 channel.connect('injected'); | 211 channel.connect('injected'); |
| 212 channel.sendWithCallback({name: 'getSAMLFlag'}, | 212 channel.sendWithCallback({name: 'getSAMLFlag'}, |
| 213 onGetSAMLFlag.bind(undefined, channel)); | 213 onGetSAMLFlag.bind(undefined, channel)); |
| 214 })(); | 214 })(); |
| OLD | NEW |