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

Side by Side Diff: chrome/browser/resources/identity_api_ui/scope_approval_dialog.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 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 var webview = document.querySelector('webview');
6
7 function start(url, win) {
8 webview.src = url;
9 if (win) {
10 webview.addEventListener('loadstop', function() {
11 win.show();
12 });
13 }
14 }
15
16 document.querySelector('.titlebar-close-button').onclick = function() {
17 window.close();
18 };
19
20 chrome.identityPrivate.getResources(function(resources) {
21 var style = document.styleSheets[0];
22
23 function insertRule(selector, url) {
24 style.insertRule(selector + ' { background-image: url(' + url + '); }',
25 style.cssRules.length);
26 }
27
28 insertRule('.titlebar-close-button', resources.IDR_CLOSE_DIALOG);
29 insertRule('.titlebar-close-button:hover', resources.IDR_CLOSE_DIALOG_H);
30 insertRule('.titlebar-close-button:active', resources.IDR_CLOSE_DIALOG_P);
31 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/identity_api_ui/scope_approval_dialog.html ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698