Chromium Code Reviews| 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 <include src="post_message_channel.js"> | 5 <include src="post_message_channel.js"> |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * @fileoverview Saml support for webview based auth. | 8 * @fileoverview Saml support for webview based auth. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 140 * @type {boolean} | 140 * @type {boolean} |
| 141 */ | 141 */ |
| 142 this.blockInsecureContent = false; | 142 this.blockInsecureContent = false; |
| 143 | 143 |
| 144 this.webview_.addEventListener( | 144 this.webview_.addEventListener( |
| 145 'contentload', this.onContentLoad_.bind(this)); | 145 'contentload', this.onContentLoad_.bind(this)); |
| 146 this.webview_.addEventListener( | 146 this.webview_.addEventListener( |
| 147 'loadabort', this.onLoadAbort_.bind(this)); | 147 'loadabort', this.onLoadAbort_.bind(this)); |
| 148 this.webview_.addEventListener( | 148 this.webview_.addEventListener( |
| 149 'loadcommit', this.onLoadCommit_.bind(this)); | 149 'loadcommit', this.onLoadCommit_.bind(this)); |
| 150 this.webview_.addEventListener( | |
| 151 'permissionrequest', function(e) { | |
| 152 if (e.permission === 'media') { | |
| 153 e.request.allow(); | |
|
xiyuan
2016/05/03 21:40:18
nit: Add a comment about where the actual permissi
| |
| 154 } | |
| 155 }); | |
| 150 | 156 |
| 151 this.webview_.request.onBeforeRequest.addListener( | 157 this.webview_.request.onBeforeRequest.addListener( |
| 152 this.onInsecureRequest.bind(this), | 158 this.onInsecureRequest.bind(this), |
| 153 {urls: ['http://*/*', 'file://*/*', 'ftp://*/*']}, | 159 {urls: ['http://*/*', 'file://*/*', 'ftp://*/*']}, |
| 154 ['blocking']); | 160 ['blocking']); |
| 155 this.webview_.request.onHeadersReceived.addListener( | 161 this.webview_.request.onHeadersReceived.addListener( |
| 156 this.onHeadersReceived_.bind(this), | 162 this.onHeadersReceived_.bind(this), |
| 157 {urls: ['<all_urls>'], types: ['main_frame', 'xmlhttprequest']}, | 163 {urls: ['<all_urls>'], types: ['main_frame', 'xmlhttprequest']}, |
| 158 ['blocking', 'responseHeaders']); | 164 ['blocking', 'responseHeaders']); |
| 159 | 165 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 444 | 450 |
| 445 onGetSAMLFlag_: function(channel, msg) { | 451 onGetSAMLFlag_: function(channel, msg) { |
| 446 return this.isSamlPage_; | 452 return this.isSamlPage_; |
| 447 }, | 453 }, |
| 448 }; | 454 }; |
| 449 | 455 |
| 450 return { | 456 return { |
| 451 SamlHandler: SamlHandler | 457 SamlHandler: SamlHandler |
| 452 }; | 458 }; |
| 453 }); | 459 }); |
| OLD | NEW |