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

Side by Side Diff: chrome/browser/resources/identity_api_ui/scope_approval_dialog.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 unified diff | Download patch | Annotate | Revision Log
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) {
James Hawkins 2013/05/13 22:24:07 nit: Document method (and rename it to be more des
Michael Courage 2013/05/14 17:10:56 Done.
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

Powered by Google App Engine
This is Rietveld 408576698