summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/resources
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sync/resources')
-rw-r--r--chrome/browser/sync/resources/about_sync.html165
-rw-r--r--chrome/browser/sync/resources/close.pngbin0 -> 178 bytes
-rw-r--r--chrome/browser/sync/resources/gaia_login.html331
-rw-r--r--chrome/browser/sync/resources/gear.pngbin0 -> 357 bytes
-rw-r--r--chrome/browser/sync/resources/google_transparent.pngbin0 -> 1580 bytes
-rw-r--r--chrome/browser/sync/resources/merge_and_sync.html66
-rw-r--r--chrome/browser/sync/resources/merge_and_sync.pngbin0 -> 7679 bytes
-rw-r--r--chrome/browser/sync/resources/new_tab_personalization.html117
-rw-r--r--chrome/browser/sync/resources/setup_flow.html19
9 files changed, 698 insertions, 0 deletions
diff --git a/chrome/browser/sync/resources/about_sync.html b/chrome/browser/sync/resources/about_sync.html
new file mode 100644
index 0000000..0fbd6df
--- /dev/null
+++ b/chrome/browser/sync/resources/about_sync.html
@@ -0,0 +1,165 @@
+<html>
+</html>
+<html id="t">
+<head>
+<title>About Sync</title>
+
+<style type="text/css">
+body {
+ font-size: 84%;
+ font-family: Arial, Helvetica, sans-serif;
+ padding: 0.75em;
+ margin: 0;
+ min-width: 45em;
+}
+
+h1 {
+ font-size: 110%;
+ font-weight: bold;
+ color: #4a8ee6;
+ letter-spacing: -1px;
+ padding: 0;
+ margin: 0;
+}
+h2 {
+ font-size: 110%;
+ letter-spacing: -1px;
+ font-weight: normal;
+ color: #4a8ee6;
+ padding: 0;
+ margin: 0;
+ padding: 0.5em 1em;
+ color: #3a75bd;
+ margin-left: -38px;
+ padding-left: 38px;
+
+ border-top: 1px solid #3a75bd;
+ padding-top: 0.5em;
+
+}
+h2:first-child {
+ border-top: 0;
+ padding-top: 0;
+}
+
+div#header {
+ padding: 0.75em 1em;
+ padding-top: 0.6em;
+ padding-left: 0;
+ margin-bottom: 0.75em;
+ position: relative;
+ overflow: hidden;
+ background: #5296de;
+ -webkit-background-size: 100%;
+ border: 1px solid #3a75bd;
+ -webkit-border-radius: 6px;
+ color: white;
+ text-shadow: 0 0 2px black;
+}
+div#header h1 {
+ padding-left: 37px;
+ margin: 0;
+ display: inline;
+ background: url('gear.png') 12px 60% no-repeat;
+ color: white;
+}
+div#header p {
+ font-size: 84%;
+ font-style: italic;
+ padding: 0;
+ margin: 0;
+ color: white;
+ padding-left: 0.4em;
+ display: inline;
+}
+
+table.list {
+ line-height: 200%;
+ border-collapse: collapse;
+ font-size: 84%;
+ table-layout: fixed;
+}
+table.list:not([class*='filtered']) tr:nth-child(odd) td {
+ background: #eff3ff;
+}
+
+table.list td {
+ padding: 0 0.5em;
+ vertical-align: top;
+ line-height: 1.4em;
+ padding-top: 0.35em;
+}
+table.list tr td:nth-last-child(1),
+table.list tr th:nth-last-child(1) {
+ padding-right: 1em;
+}
+table.list:not([class*='filtered']) .tab .name {
+ padding-left: 1.5em;
+}
+
+table.list .name {
+}
+
+table.list .name div {
+ height: 1.6em;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+
+table.list .number {
+ width: 7em;
+ text-align: right;
+}
+
+table.list#details tr:not([class*='firstRow']) > *:nth-child(1),
+table.list#details tr:not([class*='firstRow']) > *:nth-child(4),
+table.list#details tr.firstRow th:nth-child(1),
+table.list#details tr.firstRow th:nth-child(2) {
+ border-right: 1px solid #b5c6de;
+}
+table.list#details .name {
+ padding-left: 25px;
+ background-position: 5px center;
+ background-repeat: no-repeat;
+}
+</style>
+</head>
+<body>
+ <div id='header'>
+ <h1>About Sync</h1>
+ <p> Sync engine diagnostic data</p>
+ </div>
+ <div id='content'>
+ <h2> Summary </h2>
+ <strong jscontent="summary"></strong>
+ <br /><br /><br />
+ <h2> Details </h2>
+ <table class='list' id='details'>
+ <tr>
+ <td class='name'> Authenticated </td>
+ <td class='number'>
+ <div jscontent="authenticated"> </div>
+ <div jsdisplay="!authenticated"
+ style="color:red"
+ jscontent="auth_problem"></div>
+ </td>
+ </tr>
+ </tr>
+ <tr>
+ <td class='name'>Last Synced</td>
+ <td class='number' jscontent="time_since_sync"> </td>
+ </tr>
+ <tr jsselect="details">
+ <td class='name'>
+ <div jscontent="stat_name"></div>
+ </td>
+ <td class='number'>
+ <div jscontent="stat_value"></div>
+ </td>
+ </tr>
+ </table>
+ </div>
+</body>
+</html>
+
diff --git a/chrome/browser/sync/resources/close.png b/chrome/browser/sync/resources/close.png
new file mode 100644
index 0000000..84ff892
--- /dev/null
+++ b/chrome/browser/sync/resources/close.png
Binary files differ
diff --git a/chrome/browser/sync/resources/gaia_login.html b/chrome/browser/sync/resources/gaia_login.html
new file mode 100644
index 0000000..17cc102
--- /dev/null
+++ b/chrome/browser/sync/resources/gaia_login.html
@@ -0,0 +1,331 @@
+<html>
+<style type="text/css"><!--
+ body,td,div,p,a,font,span {font-family: arial,sans-serif;}
+ body { bgcolor:"#ffffff" }
+ A:link {color:#0000cc; }
+ A:visited { color:#551a8b; }
+ A:active { color:#ff0000; }
+ .form-noindent {background-color: #ffffff; border: #C3D9FF 1px solid}
+--></style>
+ <head>
+ <style type="text/css"><!--
+ .body { margin-left: 3em;
+ margin-right: 5em;
+ font-family: arial,sans-serif; }
+ div.errorbox-good {}
+ div.errorbox-bad {}
+ div.errormsg { color: red; font-size: smaller;
+ font-family: arial,sans-serif;}
+ font.errormsg { color: red; font-size: smaller;
+ font-family: arial,sans-serif;}
+ hr {
+ border: 0;
+ background-color:#DDDDDD;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 5px;
+ }
+ --></style>
+ </head>
+ <body dir="ltr" bgcolor="#ffffff" vlink="#666666"
+ style="margin-bottom: 0" onload="initForm();">
+ <table width="100%" align="center" cellpadding="1" cellspacing="1">
+ <tr>
+ <td valign="top"> <!-- LOGIN BOX -->
+ <script>
+ function gaia_setFocus() {
+ var f = null;
+ if (document.getElementById) {
+ f = document.getElementById("gaia_loginform");
+ } else if (window.gaia_loginform) {
+ f = window.gaia_loginform;
+ }
+ if (f) {
+ if (f.Email && (f.Email.value == null || f.Email.value == "")) {
+ f.Email.focus();
+ } else if (f.Passwd) {
+ f.Passwd.focus();
+ }
+ }
+ }
+
+ function advanceThrobber() {
+ var throbber = document.getElementById('throb');
+ throbber.style.backgroundPositionX =
+ ((parseInt(throbber.style.backgroundPositionX) - 16) % 576) + 'px';
+ }
+
+ function showGaiaLogin(args) {
+ var throbber = document.getElementById('throbber_container');
+ throbber.style.display = "none";
+ var f = document.getElementById("gaia_loginform");
+ if (f) {
+ f.Email.value = args.user;
+ }
+ resetErrorVisibility();
+ var t = document.getElementById("errormsg_1_Password");
+ if (t) {
+ t.innerHTML = "Username and password do not match. [<a href=\"http://www.google.com/support/accounts/bin/answer.py?ctx=ch&answer=27444\">?</a>]";
+ }
+ if (1 == args.error) {
+ setElementDisplay("errormsg_1_Password", 'table-row');
+ setBlurbError();
+ }
+ if (3 == args.error) {
+ setElementDisplay("errormsg_0_Connection", 'table-row');
+ setBlurbError();
+ }
+ document.getElementById("signIn").disabled = false;
+ gaia_setFocus();
+ }
+
+ function CloseDialog() {
+ chrome.send("DialogClose", [""]);
+ }
+
+ function showGaiaSuccessAndClose() {
+ document.getElementById("signIn").value = "Success!";
+ setTimeout(CloseDialog, 1600);
+ }
+
+ function showGaiaSuccessAndSettingUp() {
+ document.getElementById("signIn").value = "Setting up...";
+ }
+
+ function initForm() {
+ setInterval(advanceThrobber, 30);
+ var args = JSON.parse(chrome.dialogArguments);
+ showGaiaLogin(args);
+ }
+
+ function sendCredentialsAndClose() {
+ if (!setErrorVisibility())
+ return false;
+
+ var throbber = document.getElementById('throbber_container');
+ throbber.style.display = "inline";
+ var f = document.getElementById("gaia_loginform");
+ var result = JSON.stringify({"user" : f.Email.value,
+ "pass" : f.Passwd.value});
+ document.getElementById("signIn").disabled = true;
+ chrome.send("SubmitAuth", [result]);
+ }
+
+ function setElementDisplay(id, display) {
+ var d = document.getElementById(id);
+ if (d)
+ d.style.display = display;
+ }
+
+ function setBlurbError() {
+ var blurb = document.getElementById("top_blurb");
+ blurb.innerHTML =
+ '<font size="-1">Setting up Bookmarks Sync<br/><br/><b>Error signing in.</b></font>';
+ }
+
+ function resetErrorVisibility() {
+ setElementDisplay("errormsg_0_Email", 'none');
+ setElementDisplay("errormsg_0_Password", 'none');
+ setElementDisplay("errormsg_1_Password", 'none');
+ setElementDisplay("errormsg_0_Connection", 'none');
+ }
+
+ function setErrorVisibility() {
+ resetErrorVisibility();
+ var f = document.getElementById("gaia_loginform");
+ if (null == f.Email.value || "" == f.Email.value) {
+ setElementDisplay("errormsg_0_Email", 'table-row');
+ setBlurbError();
+ return false;
+ }
+ if (null == f.Passwd.value || "" == f.Passwd.value) {
+ setElementDisplay("errormsg_0_Password", 'table-row');
+ setBlurbError();
+ return false;
+ }
+ return true;
+ }
+ </script>
+<style type="text/css"><!--
+ div.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif; }
+ font.errormsg { color: red; font-size: smaller; font-family:arial,sans-serif;}
+--></style>
+<style type="text/css"><!--
+.gaia.le.lbl { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
+.gaia.le.fpwd { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
+.gaia.le.chusr { font-family: Arial, Helvetica, sans-serif; font-size: 70%; }
+.gaia.le.val { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
+.gaia.le.button { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
+.gaia.le.rem { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
+.gaia.captchahtml.desc { font-family: arial, sans-serif; font-size: smaller; }
+.gaia.captchahtml.cmt { font-family: arial, sans-serif; font-size: smaller;
+ font-style: italic; }
+--></style>
+<p id="top_blurb"> <font size="-1">
+Google Chrome can sync your bookmarks with your Google account &ndash;
+bookmarks you create on this computer will be made instantly visible on all the
+computers synced to the same account.</font></p>
+<form id="gaia_loginform" onsubmit="sendCredentialsAndClose(); return false;">
+<div id="gaia_loginbox">
+<table class="form-noindent" cellspacing="3" cellpadding="5" width="100%"
+ border="0">
+ <tr>
+ <td valign="top" style="text-align:center" nowrap="nowrap"
+ bgcolor="#e8eefa">
+ <div class="loginBox">
+ <table id="gaia_table" align="center" border="0" cellpadding="1"
+ cellspacing="0">
+ <tr>
+ <td colspan="2" align="center">
+ <font size="-1"> Sign in with your </font>
+ <table>
+ <tr>
+ <td valign="top">
+ <img src="google_transparent.png" alt="Google">
+ </img>
+ </td>
+ <td valign="middle">
+ <font size="+0"><b>Account</b> </font>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <script type="text/javascript"><!--
+ function onPreCreateAccount() {
+ return true;
+ }
+ function onPreLogin() {
+ if (window["onlogin"] != null) {
+ return onlogin();
+ } else {
+ return true;
+ }
+ }
+ --></script>
+ <tr>
+ <td colspan="2" align="center"> </td>
+ </tr>
+ <tr>
+ <td nowrap="nowrap">
+ <div align="right">
+ <span class="gaia le lbl">
+ Email:
+ </span>
+ </div>
+ </td>
+ <td>
+ <input type="text" name="Email" id="Email" size="18"
+ value="" class='gaia le val' />
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td align="left">
+ <div class="errormsg" id="errormsg_0_Email">
+ Required field cannot be left blank
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td align="left"> </td>
+ </tr>
+ <tr>
+ <td align="right">
+ <span class="gaia le lbl">
+ Password:
+ </span>
+ </td>
+ <td>
+ <input type="password" name="Passwd" id="Passwd" size="18"
+ class="gaia le val"/>
+ </td>
+ </tr>
+ <tr>
+ <td></td>
+ <td align="left">
+ <div class="errormsg" id="errormsg_0_Password">
+ Required field cannot be left blank
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td align="left">
+ <div class="errormsg" id="errormsg_1_Password">
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td align="left">
+ <div class="errormsg" id="errormsg_0_Connection">
+ Could not connect to the server
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td align="left">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ </td>
+ <td align="left">
+ <table>
+ <tr>
+ <td>
+ <div id="throbber_container" style="display:none">
+ <div id="throb" style="background-image:url(throbber.png);
+ width:16px; height:16px; background-position:0px;">
+ </div>
+ </div>
+ </td>
+ <td>
+ <input id="signIn" type="button" class="gaia le button"
+ name="signIn" value="Sign in"
+ onclick="sendCredentialsAndClose();" />
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr id="ga-fprow">
+ <td colspan="2" height="16.0" class="gaia le fpwd"
+ align="center" valign="bottom">
+ <a href="http://www.google.com/support/accounts/bin/answer.py?answer=48598&hl=en&fpUrl=https%3A%2F%2Fwww.google.com%2Faccounts%2FForgotPasswd%3FfpOnly%3D1%26service%3Dchromiumsync"
+ target=_blank>
+ I cannot access my account
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" height="16.0" class="gaia le fpwd"
+ align="center" valign="bottom">
+ <a href="javascript:var popup=window.open('https%3A%5Cx2F%5Cx2Fwww.google.com%5Cx2Faccounts%5Cx2FNewAccount%3Fservice%3Dchromiumsync', 'NewAccount', 'height=870,width=870,resizable=yes,scrollbars=yes');">
+ Create a Google account
+ </a>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </td>
+ </tr>
+</table>
+</div>
+</form>
+</td>
+</tr>
+ </table>
+ <div align="right">
+ <input type="button" name="cancel" value="Cancel" onclick="CloseDialog();"/>
+ </div>
+ </table>
+</body>
+</html>
diff --git a/chrome/browser/sync/resources/gear.png b/chrome/browser/sync/resources/gear.png
new file mode 100644
index 0000000..3dce105
--- /dev/null
+++ b/chrome/browser/sync/resources/gear.png
Binary files differ
diff --git a/chrome/browser/sync/resources/google_transparent.png b/chrome/browser/sync/resources/google_transparent.png
new file mode 100644
index 0000000..73edad4
--- /dev/null
+++ b/chrome/browser/sync/resources/google_transparent.png
Binary files differ
diff --git a/chrome/browser/sync/resources/merge_and_sync.html b/chrome/browser/sync/resources/merge_and_sync.html
new file mode 100644
index 0000000..58a769b
--- /dev/null
+++ b/chrome/browser/sync/resources/merge_and_sync.html
@@ -0,0 +1,66 @@
+<HTML>
+<HEAD>
+<TITLE></TITLE>
+<style type="text/css">
+ body,td,div,p,a,font,span {font-family: arial,sans-serif;}
+ body { bgcolor:"#ffffff" }
+.gaia.le.button { font-family: Arial, Helvetica, sans-serif; font-size: smaller; }
+</style>
+<script>
+ function advanceThrobber() {
+ var throbber = document.getElementById('throb');
+ throbber.style.backgroundPositionX =
+ ((parseInt(throbber.style.backgroundPositionX) - 16) % 576) + 'px';
+ }
+
+ function acceptMergeAndSync() {
+ var throbber = document.getElementById('throbber_container');
+ throbber.style.display = "inline";
+ document.getElementById("acceptMerge").disabled = true;
+ chrome.send("SubmitMergeAndSync", [""]);
+ }
+
+ function Close() {
+ chrome.send("DialogClose", [""]);
+ }
+
+ function showMergeAndSyncDone() {
+ var throbber = document.getElementById('throbber_container');
+ throbber.style.display = "none";
+ document.getElementById("header").innerHTML =
+ "<font size='-1'><b>All done!</b></font>";
+ document.getElementById("close").value = "Close";
+ setTimeout(Close, 1600);
+ }
+</script>
+</HEAD>
+<BODY onload="setInterval(advanceThrobber, 30);">
+<p id="header"><font size="-1"><b>Your bookmarks will be merged.</b></font></p><br />
+<img src="merge_and_sync.png" alt="Merge and sync" />
+<br />
+<p><font size="-1">
+Your existing online bookmarks will be merged with the
+bookmarks on this machine. You can use the Bookmark Manager to organize
+your bookmarks after the merge.</font></p>
+<br />
+<table align="right">
+ <tr>
+ <td>
+ <div id="throbber_container" style="display:none">
+ <div id="throb" style="background-image:url(throbber.png);
+ width:16px; height:16px; background-position:0px;">
+ </div>
+ </div>
+ </td>
+ <td>
+ <input id="acceptMerge" type="button" class="gaia le button" name="accept"
+ value="Merge and sync"
+ onclick="acceptMergeAndSync();" />
+ </td>
+ <td>
+ <input id="close" type="button" value="Abort" onclick="Close();"/>
+ </td>
+ </tr>
+</table>
+</BODY>
+</HTML>
diff --git a/chrome/browser/sync/resources/merge_and_sync.png b/chrome/browser/sync/resources/merge_and_sync.png
new file mode 100644
index 0000000..a506a34
--- /dev/null
+++ b/chrome/browser/sync/resources/merge_and_sync.png
Binary files differ
diff --git a/chrome/browser/sync/resources/new_tab_personalization.html b/chrome/browser/sync/resources/new_tab_personalization.html
new file mode 100644
index 0000000..73cf346
--- /dev/null
+++ b/chrome/browser/sync/resources/new_tab_personalization.html
@@ -0,0 +1,117 @@
+<html>
+<head>
+<style type="text/css">
+body {
+ font-family:arial;
+ background-color:white;
+ font-size:80%;
+ margin:0px;
+}
+.section-title {
+ color:#000;
+ line-height:19pt;
+ font-size:95%;
+ font-weight:bold;
+ margin-bottom:4px;
+ margin-left: 0px;
+}
+a {
+ color:#0000cc;
+ white-space: nowrap;
+}
+.sidebar {
+ width: 207px;
+ padding:3px 10px 3px 9px;
+ -webkit-border-radius:5px 5px;
+ margin-bottom:10px;
+}
+</style>
+<script>
+function resizeFrame(newsize) {
+ chrome.send("ResizeP13N", [newsize.toString()]);
+}
+</script>
+</head>
+<body>
+<div id="sync" class="sidebar">
+ <table id="titletable" width="200" cellpadding="0" cellspacing="0"
+ style="display:none">
+ <tr>
+ <td id="messagetitle" align="left" class="section-title">
+ </td>
+ <td align="right">
+ <a href="#" onclick="resizeFrame(0);">
+ <img id="greenclose" src="close.png"/>
+ </a>
+ </td>
+ </tr>
+ </table>
+ <div id="syncContainer"></div>
+</div>
+<script>
+/* Return a DOM element with tag name |elem| and attributes |attrs|. */
+function DOM(elem, attrs) {
+ var elem = document.createElement(elem);
+ for (var attr in attrs) {
+ elem[attr] = attrs[attr];
+ }
+ return elem;
+}
+
+function renderSyncMessage(message) {
+ var section = document.getElementById('sync');
+ var container = document.getElementById('syncContainer');
+ var title = document.getElementById('messagetitle');
+ var titletable = document.getElementById('titletable');
+ container.innerHTML = '';
+ title.innerHTML = '';
+ titletable.style.display = "none";
+ section.style.display = "block";
+
+ /* Set the sync section background color. */
+ if (message.msgtype == "error") {
+ section.style.backgroundColor = "#f8d1ca";
+ } else if (message.msgtype == "presynced") {
+ section.style.backgroundColor = "#e0f8ca";
+ } else {
+ section.style.backgroundColor = "#e1ecfe";
+ }
+
+ if (message.msgtype != "synced") {
+ /* Any message except the status normal / synced to
+ message requires extra markup for a title, close button,
+ and links. */
+ var titletxt = document.createTextNode(message.title);
+ title.appendChild(titletxt);
+ titletable.style.display = "block";
+ }
+
+ /* The main message of the sync section. */
+ var txt = DOM('p');
+ txt.style.margin = 0;
+ txt.appendChild(document.createTextNode(message.msg));
+ container.appendChild(txt);
+
+ /* If we should show a link, create the href. */
+ if (message.linktext) {
+ var link = DOM('a', { href:"#", title: message.linktext});
+ link.onclick = function(tt) {
+ return function() {
+ chrome.send("SyncLinkClicked", [tt]);
+ return false;
+ }
+ } (message.title);
+
+ /* Tie it together. */
+ link.appendChild(document.createTextNode(message.linktext));
+ container.appendChild(link);
+ }
+
+ /* Tell our container to resize to fit us appropriately. */
+ resizeFrame(document.body.scrollHeight);
+}
+
+chrome.send("GetSyncMessage");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/chrome/browser/sync/resources/setup_flow.html b/chrome/browser/sync/resources/setup_flow.html
new file mode 100644
index 0000000..82db8a9
--- /dev/null
+++ b/chrome/browser/sync/resources/setup_flow.html
@@ -0,0 +1,19 @@
+<HTML id='t'>
+<style type="text/css">
+</style>
+<HEAD>
+<TITLE></TITLE>
+<script>
+ function showMergeAndSync() {
+ document.getElementById("login").style.display = "none";
+ document.getElementById("merge").style.display = "block";
+ }
+</script>
+</HEAD>
+<BODY style="margin:0; border:0;">
+ <iframe id="login" frameborder="0" width="100%" scrolling="no" height="100%"
+ src="cloudy://resources/gaialogin"></iframe>
+ <iframe id="merge" frameborder="0" width="100%" scrolling="no" height="100%"
+ src="cloudy://resources/mergeandsync" style="display:none"></iframe>
+</BODY>
+</HTML>