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

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

Issue 2826643002: Convert Incognito New Tab Page from i18n-* (JS) to $i18n{} (C++) (Closed)
Patch Set: todo Created 3 years, 8 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/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/ntp4/incognito_tab.html
diff --git a/chrome/browser/resources/ntp4/incognito_tab.html b/chrome/browser/resources/ntp4/incognito_tab.html
index fc50f7771af8408bf8a0cdfe7a5e6ac65af13377..5d4a5198c1498aecc23292be5eb08ab35a64363e 100644
--- a/chrome/browser/resources/ntp4/incognito_tab.html
+++ b/chrome/browser/resources/ntp4/incognito_tab.html
@@ -1,11 +1,11 @@
<!doctype html>
-<html i18n-values="dir:textdirection;
- hascustombackground:hasCustomBackground;
- bookmarkbarattached:bookmarkbarattached;
- lang:language">
+<html dir="$i18n{textdirection}"
+ hascustombackground="$i18n{hasCustomBackground}"
+ bookmarkbarattached="$i18n{bookmarkbarattached}"
+ lang="$i18n{language}">
<head>
<meta charset="utf-8">
-<title i18n-content="title"></title>
+<title>$i18n{title}</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
<link rel="stylesheet" href="incognito_and_guest_tab.css">
@@ -20,42 +20,27 @@ document.write('<link id="incognitothemecss" rel="stylesheet" ' +
<body>
<div class="content">
<div class="icon"></div>
- <span>
- <h1 i18n-content="incognitoTabHeading"></h1>
- <p>
- <span i18n-content="incognitoTabDescription"></span>
- </p>
- <p>
- <span i18n-content="incognitoTabWarning"></span>
- </p>
- </span>
- <a class="learn-more-button" i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a>
+ <h1>$i18n{incognitoTabHeading}</h1>
+ <p>$i18n{incognitoTabDescription}</p>
+ <p>$i18n{incognitoTabWarning}</p>
+ <a class="learn-more-button" href="$i18n{learnMoreLink}">$i18n{learnMore}</a>
</div>
-</body>
-<script src="chrome://resources/js/cr.js"></script>
+
<script>
-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);
- }
+var ntp = {
+ /** @param {string} attached */
+ setBookmarkBarAttached: function(attached) {
+ document.documentElement.setAttribute('bookmarkbarattached', attached);
+ },
/** @param {!{hasCustomBackground: boolean}} themeData */
- function themeChanged(themeData) {
+ themeChanged: function(themeData) {
document.documentElement.setAttribute('hascustombackground',
themeData.hasCustomBackground);
document.getElementById('incognitothemecss').href =
'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
- }
-
- return {
- setBookmarkBarAttached: setBookmarkBarAttached,
- themeChanged: themeChanged,
- };
-});
+ },
+};
</script>
+</body>
</html>
« no previous file with comments | « no previous file | chrome/browser/ui/webui/ntp/ntp_resource_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698