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

Unified Diff: chrome/browser/resources/incognito_tab.html

Issue 164002: Apply theme to incognito NTP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/resources/new_incognito_tab_theme.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/incognito_tab.html
===================================================================
--- chrome/browser/resources/incognito_tab.html (revision 22523)
+++ chrome/browser/resources/incognito_tab.html (working copy)
@@ -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 @@
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 @@
<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>
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/resources/new_incognito_tab_theme.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698