OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 chrome.identityPrivate.onWebFlowRequest.addListener( |
| 6 function showAuthDialog(key, url, mode) { |
| 7 var options = { |
| 8 frame: 'none', |
| 9 id: key, |
| 10 minWidth: 1024, |
| 11 minHeight: 768, |
| 12 hidden: true |
| 13 }; |
| 14 chrome.app.window.create('scope_approval_dialog.html', options, |
| 15 initializeWebFlow); |
| 16 |
| 17 function initializeWebFlow(win) { |
| 18 win.contentWindow.addEventListener('load', function(event) { |
| 19 var windowParam; |
| 20 if (mode == 'interactive') |
| 21 windowParam = win; |
| 22 win.contentWindow.start(url, windowParam); |
| 23 }); |
| 24 } |
| 25 }); |
| 26 |
OLD | NEW |