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

Side by Side Diff: chrome/browser/resources/host_registration_page.html

Issue 8687012: Moved ChromeOS-specific resources from chrome/browser/resources to chrome/browser/resources/chrom... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years 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 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>Register your computer with Google</title>
6 <style>
7 #form {
8 position: absolute;
9 left: 0;
10 right: 0;
11 top: 0;
12 bottom: 0;
13 overflow: hidden;
14 width: 100%;
15 height: 100%;
16 background: -webkit-linear-gradient(#FAFBFB, #CCD1D4);
17 }
18
19 </style>
20 <script>
21 document.addEventListener('DOMContentLoaded', load);
22 window.addEventListener('message', processMessage);
23 var hostPageDomain = 'chrome://register';
24 var registerDoneUrl = 'cros://register/success';
25 var registerSkipUrl = 'cros://register/skipped';
26 var registrationUrl = '';
27
28 function load() {
29 chrome.send('getRegistrationUrl', []);
30 }
31 function $(o) {
32 return document.getElementById(o);
33 }
34
35 function processMessage(e) {
36 if (e.data.domain != registrationUrl){
37 skipRegistration();
38 return;
39 }
40
41 if (e.data.type == 'get_user_info') {
42 chrome.send('getUserInfo', []);
43 } else if (e.data.type == 'complete_registration') {
44 location.replace(e.data.payload.registration_status ? registerDoneUrl :
45 registerSkipUrl);
46 }
47 }
48
49 function setRegistrationUrl(url) {
50 registrationUrl = url;
51 $('form').contentWindow.location.href = url;
52 }
53
54 function setUserInfo(userInfo) {
55 var msg = {
56 type: 'set_user_info',
57 domain: hostPageDomain,
58 payload: userInfo
59 };
60 $('form').contentWindow.postMessage(msg, registrationUrl);
61 }
62
63 // Called by WebUI handler when startup manifest is not defined.
64 function skipRegistration() {
65 location.replace(registerSkipUrl);
66 }
67 </script>
68 </head>
69 <body><iframe id="form" frameborder="0"></iframe></body>
70 </html>
OLDNEW
« no previous file with comments | « chrome/browser/resources/guest_session_tab.html ('k') | chrome/browser/resources/image_burner.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698