OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * Provides a HTML5 postMessage channel to the injected JS to talk back | 7 * Provides a HTML5 postMessage channel to the injected JS to talk back |
8 * to Authenticator. | 8 * to Authenticator. |
9 */ | 9 */ |
10 'use strict'; | 10 'use strict'; |
11 | 11 |
12 // <include src="../gaia_auth/channel.js"> | 12 // <include src="channel.js"> |
13 | 13 |
14 var PostMessageChannel = (function() { | 14 var PostMessageChannel = (function() { |
15 /** | 15 /** |
16 * Allowed origins of the hosting page. | 16 * Allowed origins of the hosting page. |
17 * @type {Array<string>} | 17 * @type {Array<string>} |
18 */ | 18 */ |
19 var ALLOWED_ORIGINS = [ | 19 var ALLOWED_ORIGINS = [ |
20 'chrome://oobe', | 20 'chrome://oobe', |
21 'chrome://chrome-signin' | 21 'chrome://chrome-signin' |
22 ]; | 22 ]; |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 channelManager.onConnect.addListener(onConnect); | 364 channelManager.onConnect.addListener(onConnect); |
365 }; | 365 }; |
366 | 366 |
367 return PostMessageChannel; | 367 return PostMessageChannel; |
368 })(); | 368 })(); |
369 | 369 |
370 /** @override */ | 370 /** @override */ |
371 Channel.create = function() { | 371 Channel.create = function() { |
372 return new PostMessageChannel(); | 372 return new PostMessageChannel(); |
373 }; | 373 }; |
OLD | NEW |