| 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 // The actual permission check happens in |
| 154 // WebUILoginView::RequestMediaAccessPermission(). |
| 155 e.request.allow(); |
| 156 } |
| 157 }); |
| 150 | 158 |
| 151 this.webview_.request.onBeforeRequest.addListener( | 159 this.webview_.request.onBeforeRequest.addListener( |
| 152 this.onInsecureRequest.bind(this), | 160 this.onInsecureRequest.bind(this), |
| 153 {urls: ['http://*/*', 'file://*/*', 'ftp://*/*']}, | 161 {urls: ['http://*/*', 'file://*/*', 'ftp://*/*']}, |
| 154 ['blocking']); | 162 ['blocking']); |
| 155 this.webview_.request.onHeadersReceived.addListener( | 163 this.webview_.request.onHeadersReceived.addListener( |
| 156 this.onHeadersReceived_.bind(this), | 164 this.onHeadersReceived_.bind(this), |
| 157 {urls: ['<all_urls>'], types: ['main_frame', 'xmlhttprequest']}, | 165 {urls: ['<all_urls>'], types: ['main_frame', 'xmlhttprequest']}, |
| 158 ['blocking', 'responseHeaders']); | 166 ['blocking', 'responseHeaders']); |
| 159 | 167 |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 | 452 |
| 445 onGetSAMLFlag_: function(channel, msg) { | 453 onGetSAMLFlag_: function(channel, msg) { |
| 446 return this.isSamlPage_; | 454 return this.isSamlPage_; |
| 447 }, | 455 }, |
| 448 }; | 456 }; |
| 449 | 457 |
| 450 return { | 458 return { |
| 451 SamlHandler: SamlHandler | 459 SamlHandler: SamlHandler |
| 452 }; | 460 }; |
| 453 }); | 461 }); |
| OLD | NEW |