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

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

Issue 9861016: [NTP4] Fix theme and bookmarks bar notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 9 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 | « no previous file | 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
diff --git a/chrome/browser/resources/incognito_tab.html b/chrome/browser/resources/incognito_tab.html
index d2230e0f020b7ac1f78ba8152c482b394931c4e7..2fb757bcca92cd4b4303eb89316f0922c48c18b1 100644
--- a/chrome/browser/resources/incognito_tab.html
+++ b/chrome/browser/resources/incognito_tab.html
@@ -20,18 +20,27 @@ document.write('<link id="incognitothemecss" rel="stylesheet" ' +
</div>
</div>
</body>
+<script src="chrome://resources/js/cr.js"></script>
<script>
-function themeChanged() {
- document.getElementById('incognitothemecss').href =
- 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
-}
+cr.define('ntp', function() {
+ 'use strict';
+ /**
+ * Set whether the bookmarks bar is attached or not.
+ * @param {boolean} attached Whether the bar is attached or not.
+ */
+ function setBookmarkBarAttached(attached) {
+ document.documentElement.setAttribute('bookmarkbarattached', !!attached);
+ }
-function bookmarkBarAttached() {
- document.documentElement.setAttribute("bookmarkbarattached", "true");
-}
+ function themeChanged() {
+ document.getElementById('incognitothemecss').href =
+ 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
+ }
-function bookmarkBarDetached() {
- document.documentElement.setAttribute("bookmarkbarattached", "false");
-}
+ return {
+ setBookmarkBarAttached: setBookmarkBarAttached,
+ themeChanged: themeChanged,
+ };
+});
</script>
</html>
« no previous file with comments | « no previous file | chrome/browser/resources/new_incognito_tab_theme.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698