| 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(
|
| + 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);
|
| + });
|
| + }
|
| +});
|
| +
|
|
|