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

Unified Diff: chrome/browser/resources/identity_api_ui/identity_api_ui.js

Issue 14768009: Identity API: Add component app for auth flow UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: no permission message for identityPrivate 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 side-by-side diff with in-line comments
Download patch
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);
+ });
+ }
+});
+

Powered by Google App Engine
This is Rietveld 408576698