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

Side by Side Diff: chrome/browser/resources/identity_scope_approval_dialog/background.js

Issue 15962012: Revert "Identity API: Add component app for auth flow UI" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
(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 /**
6 * Displays a webview based authorization dialog.
7 * @param {string} key A unique identifier that the caller can use to locate
8 * the dialog window.
9 * @param {string} url A URL that will be loaded in the webview.
10 * @param {string} mode 'interactive' or 'silent'. The window will be displayed
11 * if the mode is 'interactive'.
12 */
13 function showAuthDialog(key, url, mode) {
14 var options = {
15 frame: 'none',
16 id: key,
17 minWidth: 1024,
18 minHeight: 768,
19 hidden: true
20 };
21 chrome.app.window.create('scope_approval_dialog.html',
22 options,
23 function(win) {
24 win.contentWindow.addEventListener('load', function(event) {
25 var windowParam;
26 if (mode == 'interactive')
27 windowParam = win;
28 win.contentWindow.loadAuthUrlAndShowWindow(url, windowParam);
29 });
30 });
31 }
32
33 chrome.identityPrivate.onWebFlowRequest.addListener(showAuthDialog);
34
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698