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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html i18n-values="dir:textdirection; 2 <html dir="$i18n{textdirection}"
3 hascustombackground:hasCustomBackground; 3 hascustombackground="$i18n{hasCustomBackground}"
4 bookmarkbarattached:bookmarkbarattached; 4 bookmarkbarattached="$i18n{bookmarkbarattached}"
5 lang:language"> 5 lang="$i18n{language}">
6 <head> 6 <head>
7 <meta charset="utf-8"> 7 <meta charset="utf-8">
8 <title i18n-content="title"></title> 8 <title>$i18n{title}</title>
9 <meta name="viewport" content="width=device-width"> 9 <meta name="viewport" content="width=device-width">
10 <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css"> 10 <link rel="stylesheet" href="chrome://resources/css/text_defaults_md.css">
11 <link rel="stylesheet" href="incognito_and_guest_tab.css"> 11 <link rel="stylesheet" href="incognito_and_guest_tab.css">
12 <link rel="stylesheet" href="incognito_tab.css"> 12 <link rel="stylesheet" href="incognito_tab.css">
13 <script> 13 <script>
14 // Until themes can clear the cache, force-reload the theme stylesheet. 14 // Until themes can clear the cache, force-reload the theme stylesheet.
15 document.write('<link id="incognitothemecss" rel="stylesheet" ' + 15 document.write('<link id="incognitothemecss" rel="stylesheet" ' +
16 'href="chrome://theme/css/incognito_new_tab_theme.css?' + 16 'href="chrome://theme/css/incognito_new_tab_theme.css?' +
17 Date.now() + '">'); 17 Date.now() + '">');
18 </script> 18 </script>
19 </head> 19 </head>
20 <body> 20 <body>
21 <div class="content"> 21 <div class="content">
22 <div class="icon"></div> 22 <div class="icon"></div>
23 <span> 23 <h1>$i18n{incognitoTabHeading}</h1>
24 <h1 i18n-content="incognitoTabHeading"></h1> 24 <p>$i18n{incognitoTabDescription}</p>
25 <p> 25 <p>$i18n{incognitoTabWarning}</p>
26 <span i18n-content="incognitoTabDescription"></span> 26 <a class="learn-more-button" href="$i18n{learnMoreLink}">$i18n{learnMore}</a>
27 </p>
28 <p>
29 <span i18n-content="incognitoTabWarning"></span>
30 </p>
31 </span>
32 <a class="learn-more-button" i18n-content="learnMore" i18n-values=".href:learn MoreLink"></a>
33 </div> 27 </div>
34 </body> 28
35 <script src="chrome://resources/js/cr.js"></script>
36 <script> 29 <script>
37 cr.define('ntp', function() { 30 var ntp = {
38 'use strict'; 31 /** @param {string} attached */
39 /** 32 setBookmarkBarAttached: function(attached) {
40 * Set whether the bookmarks bar is attached or not. 33 document.documentElement.setAttribute('bookmarkbarattached', attached);
41 * @param {boolean} attached Whether the bar is attached or not. 34 },
42 */
43 function setBookmarkBarAttached(attached) {
44 document.documentElement.setAttribute('bookmarkbarattached', !!attached);
45 }
46 35
47 /** @param {!{hasCustomBackground: boolean}} themeData */ 36 /** @param {!{hasCustomBackground: boolean}} themeData */
48 function themeChanged(themeData) { 37 themeChanged: function(themeData) {
49 document.documentElement.setAttribute('hascustombackground', 38 document.documentElement.setAttribute('hascustombackground',
50 themeData.hasCustomBackground); 39 themeData.hasCustomBackground);
51 document.getElementById('incognitothemecss').href = 40 document.getElementById('incognitothemecss').href =
52 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now(); 41 'chrome://theme/css/incognito_new_tab_theme.css?' + Date.now();
53 } 42 },
54 43 };
55 return {
56 setBookmarkBarAttached: setBookmarkBarAttached,
57 themeChanged: themeChanged,
58 };
59 });
60 </script> 44 </script>
45 </body>
61 </html> 46 </html>
OLDNEW
« 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