Chromium Code Reviews| Index: chrome/browser/resources/identity_api_ui/identity_api_ui.js |
| diff --git a/chrome/browser/resources/identity_api_ui/identity_api_ui.js b/chrome/browser/resources/identity_api_ui/identity_api_ui.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..705f7ed5377c62cde22631697b8b229f241affd3 |
| --- /dev/null |
| +++ b/chrome/browser/resources/identity_api_ui/identity_api_ui.js |
| @@ -0,0 +1,26 @@ |
| +// Copyright 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +chrome.identityPrivate.onWebFlowRequest.addListener( |
|
James Hawkins
2013/05/13 22:24:07
Is this a background page, or what? Should we be
Michael Courage
2013/05/14 17:10:56
This is the background page for the app. There isn
|
| + function showAuthDialog(key, url, mode) { |
| + var options = { |
| + frame: 'none', |
| + id: key, |
| + minWidth: 1024, |
| + minHeight: 768, |
| + hidden: true |
| + }; |
| + chrome.app.window.create('scope_approval_dialog.html', options, |
| + initializeWebFlow); |
| + |
| + function initializeWebFlow(win) { |
| + win.contentWindow.addEventListener('load', function(event) { |
| + var windowParam; |
| + if (mode == 'interactive') |
| + windowParam = win; |
| + win.contentWindow.start(url, windowParam); |
| + }); |
| + } |
| +}); |
| + |