Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/resources/gaia_auth_host/saml_handler.js

Issue 1936903002: Allow SAML logins to use the webcam (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment to JS re: C++ permission check Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/settings/device_settings_provider.cc ('k') | chrome/test/data/policy/policy_test_cases.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698