diff options
author | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 16:37:56 +0000 |
---|---|---|
committer | mirandac@chromium.org <mirandac@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-06 16:37:56 +0000 |
commit | a5badef3bf8c412fd0355af4f4e6c51d4d7728c3 (patch) | |
tree | f78e6d846416b221db34099a4e75c7e4ca4f3fe9 /chrome/browser/resources | |
parent | dc312c76b087814e761c283b24f48fbdf4a647d2 (diff) | |
download | chromium_src-a5badef3bf8c412fd0355af4f4e6c51d4d7728c3.zip chromium_src-a5badef3bf8c412fd0355af4f4e6c51d4d7728c3.tar.gz chromium_src-a5badef3bf8c412fd0355af4f4e6c51d4d7728c3.tar.bz2 |
Apply theme to incognito NTP.
BUG= http://crbug.com/18480
TEST= Open incognito window. Note that NTP is themed.
Review URL: http://codereview.chromium.org/164002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22613 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources')
-rw-r--r-- | chrome/browser/resources/incognito_tab.html | 22 | ||||
-rw-r--r-- | chrome/browser/resources/new_incognito_tab_theme.css | 11 |
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 |