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

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

Issue 14081014: Identity API: Change WebAuthFlow to use <webview> instead of a normal browser pop-up. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: chrome.identity side-by-side with chrome.experimental.identity 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(
+ 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);
+ });
+ }
+});
+
« no previous file with comments | « chrome/browser/resources/identity_api_ui/identity_api_ui.css ('k') | chrome/browser/resources/identity_api_ui/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698