summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r--chrome/browser/resources/incognito_tab.html22
-rw-r--r--chrome/browser/resources/new_incognito_tab_theme.css11
2 files changed, 32 insertions, 1 deletions
diff --git a/chrome/browser/resources/incognito_tab.html b/chrome/browser/resources/incognito_tab.html
index 064aa32..9b493dd 100644
--- a/chrome/browser/resources/incognito_tab.html
+++ b/chrome/browser/resources/incognito_tab.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html i18n-values="dir:textdirection">
+<html i18n-values="dir:textdirection;bookmarkbarattached:bookmarkbarattached">
<head>
<title i18n-content="title"></title>
<style>
@@ -20,6 +20,12 @@ body {
margin-right:auto;
}
</style>
+<script>
+// Until themes can clear the cache, force-reload the theme stylesheet.
+document.write('<link id="incognitothemecss" rel="stylesheet" ' +
+ 'href="chrome://theme/css/newincognitotab.css?' +
+ Date.now() + '">');
+</script>
</head>
<body>
<div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize">
@@ -27,4 +33,18 @@ body {
<span i18n-values=".innerHTML:content"></span>
</div>
</body>
+<script>
+function themeChanged() {
+ document.getElementById('incognitothemecss').href =
+ 'chrome://theme/css/newincognitotab.css?' + Date.now();
+}
+
+function bookmarkBarAttached() {
+ document.documentElement.setAttribute("bookmarkbarattached", "true");
+}
+
+function bookmarkBarDetached() {
+ document.documentElement.setAttribute("bookmarkbarattached", "false");
+}
+</script>
</html>
diff --git a/chrome/browser/resources/new_incognito_tab_theme.css b/chrome/browser/resources/new_incognito_tab_theme.css
new file mode 100644
index 0000000..d4e7f9e
--- /dev/null
+++ b/chrome/browser/resources/new_incognito_tab_theme.css
@@ -0,0 +1,11 @@
+html {
+ background-image:url(chrome://theme/theme_ntp_background?$1);
+ background-color:$2;
+ background-position:$3;
+ background-repeat:$5;
+ overflow:hidden;
+}
+
+html[bookmarkbarattached='true'] {
+ background-position:$4;
+} \ No newline at end of file