OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html i18n-values=" | 2 <html i18n-values=" |
3 dir:textdirection; | 3 dir:textdirection; |
4 bookmarkbarattached:bookmarkbarattached; | 4 bookmarkbarattached:bookmarkbarattached; |
5 hasattribution:hasattribution; | 5 hasattribution:hasattribution; |
6 anim:anim; | 6 anim:anim; |
7 syncispresent:syncispresent; | 7 syncispresent:syncispresent; |
8 customlogo:customlogo" | 8 customlogo:customlogo" |
9 install-animation-enabled="true"> | 9 install-animation-enabled="true"> |
10 <head> | 10 <head> |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 chrome.send('getRecentlyClosedTabs'); | 55 chrome.send('getRecentlyClosedTabs'); |
56 chrome.send('getForeignSessions'); | 56 chrome.send('getForeignSessions'); |
57 chrome.send('getApps'); | 57 chrome.send('getApps'); |
58 | 58 |
59 </script> | 59 </script> |
60 <!-- template data placeholder --> | 60 <!-- template data placeholder --> |
61 <link rel="stylesheet" href="new_tab.css"> | 61 <link rel="stylesheet" href="new_tab.css"> |
62 <link rel="stylesheet" href="ntp/most_visited.css"> | 62 <link rel="stylesheet" href="ntp/most_visited.css"> |
63 <link rel="stylesheet" href="ntp/apps.css"> | 63 <link rel="stylesheet" href="ntp/apps.css"> |
64 <link rel="stylesheet" href="shared/css/menu.css"> | 64 <link rel="stylesheet" href="shared/css/menu.css"> |
| 65 <link rel="stylesheet" href="chrome://resources/css/button.css"> |
| 66 <link rel="stylesheet" href="chrome://resources/css/throbber.css"> |
| 67 <link rel="stylesheet" href="sync_setup_overlay.css"> |
| 68 <link rel="stylesheet" href="new_tab_sync_promo.css"> |
65 <script> | 69 <script> |
66 | 70 |
67 /** | 71 /** |
68 * Bitmask for the different UI sections. | 72 * Bitmask for the different UI sections. |
69 * This matches the Section enum in ../webui/shown_sections_handler.h | 73 * This matches the Section enum in ../webui/shown_sections_handler.h |
70 * @enum {number} | 74 * @enum {number} |
71 */ | 75 */ |
72 var Section = { | 76 var Section = { |
73 THUMB: 1 << 0, | 77 THUMB: 1 << 0, |
74 APPS: 1 << 6 | 78 APPS: 1 << 6 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 // on it. | 122 // on it. |
119 if ('mode' in hashParams) { | 123 if ('mode' in hashParams) { |
120 document.documentElement.setAttribute('mode', hashParams['mode']); | 124 document.documentElement.setAttribute('mode', hashParams['mode']); |
121 } | 125 } |
122 | 126 |
123 </script> | 127 </script> |
124 </head> | 128 </head> |
125 <body class="loading" | 129 <body class="loading" |
126 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> | 130 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> |
127 | 131 |
| 132 <div id="sync-promo" class="collapsed" hidden> |
| 133 <div id="sync-promo-login-status"> |
| 134 <span id="sync-promo-user-name"></span> |
| 135 <span id="sync-promo-not-connected" |
| 136 i18n-content="statusNotConnected" hidden></span> |
| 137 </div> |
| 138 <div id="sync-promo-contents"> |
| 139 <include src="sync_setup_overlay.html"> |
| 140 </div> |
| 141 <div id="sync-promo-toggle"> |
| 142 <input id="sync-promo-toggle-button" type="image" |
| 143 src="sync_promo_minimize.png"> |
| 144 </div> |
| 145 </div> |
| 146 |
128 <div id="attribution" class="attribution nolayout"> | 147 <div id="attribution" class="attribution nolayout"> |
129 <div i18n-content="attributionintro"></div> | 148 <div i18n-content="attributionintro"></div> |
130 <img id="attribution-img"> | 149 <img id="attribution-img"> |
131 </div> | 150 </div> |
132 | 151 |
133 <div id="main"> | 152 <div id="main"> |
134 | 153 |
135 <div id="notification-container"> | 154 <div id="notification-container"> |
136 <div id="notification"> | 155 <div id="notification"> |
137 <div> </div> | 156 <div> </div> |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 <script src="shared/js/cr/ui/position_util.js"></script> | 318 <script src="shared/js/cr/ui/position_util.js"></script> |
300 <script src="shared/js/cr/ui/menu_button.js"></script> | 319 <script src="shared/js/cr/ui/menu_button.js"></script> |
301 <script src="shared/js/cr/ui/context_menu_button.js"></script> | 320 <script src="shared/js/cr/ui/context_menu_button.js"></script> |
302 <script src="shared/js/cr/ui/context_menu_handler.js"></script> | 321 <script src="shared/js/cr/ui/context_menu_handler.js"></script> |
303 | 322 |
304 <script src="ntp/drag_drop_controller.js"></script> | 323 <script src="ntp/drag_drop_controller.js"></script> |
305 <script src="ntp/most_visited.js"></script> | 324 <script src="ntp/most_visited.js"></script> |
306 <script src="new_tab.js"></script> | 325 <script src="new_tab.js"></script> |
307 <script src="ntp/apps.js"></script> | 326 <script src="ntp/apps.js"></script> |
308 | 327 |
| 328 <script src="chrome://resources/js/cr/event_target.js"></script> |
| 329 <!-- TODO(sail): Refactor options_page and remove this include. --> |
| 330 <script src="options/options_page.js"></script> |
| 331 <script src="sync_setup_overlay.js"></script> |
| 332 <script src="new_tab_sync_promo.js"></script> |
| 333 |
309 <script> | 334 <script> |
310 cr.ui.decorate('menu', cr.ui.Menu); | 335 cr.ui.decorate('menu', cr.ui.Menu); |
311 cr.ui.decorate('command', cr.ui.Command); | 336 cr.ui.decorate('command', cr.ui.Command); |
312 cr.ui.decorate('button[menu]', cr.ui.MenuButton); | 337 cr.ui.decorate('button[menu]', cr.ui.MenuButton); |
313 | 338 |
314 if (cr.isChromeOS) | 339 if (cr.isChromeOS) |
315 $('closed-sections-bar').setAttribute('chromeos', true); | 340 $('closed-sections-bar').setAttribute('chromeos', true); |
316 | 341 |
317 initializeLogin(); | 342 initializeLogin(); |
318 | 343 |
319 initializeSection('apps', MENU_APPS, Section.APPS); | 344 initializeSection('apps', MENU_APPS, Section.APPS); |
320 initializeSection('most-visited', MENU_THUMB, Section.THUMB); | 345 initializeSection('most-visited', MENU_THUMB, Section.THUMB); |
321 initializeSection('recently-closed', MENU_RECENT); | 346 initializeSection('recently-closed', MENU_RECENT); |
322 | 347 |
323 updateSimpleSection('apps', Section.APPS); | 348 updateSimpleSection('apps', Section.APPS); |
324 updateSimpleSection('most-visited', Section.THUMB); | 349 updateSimpleSection('most-visited', Section.THUMB); |
325 var appsInitiallyMenu = shownSections & MENU_APPS; | 350 var appsInitiallyMenu = shownSections & MENU_APPS; |
326 var mostVisitedInitiallyMenu = shownSections & MENU_THUMB; | 351 var mostVisitedInitiallyMenu = shownSections & MENU_THUMB; |
327 var recentlyClosedInitiallyMenu = shownSections & MENU_RECENT; | 352 var recentlyClosedInitiallyMenu = shownSections & MENU_RECENT; |
328 setSectionMenuMode('apps', Section.APPS, appsInitiallyMenu, MENU_APPS); | 353 setSectionMenuMode('apps', Section.APPS, appsInitiallyMenu, MENU_APPS); |
329 setSectionMenuMode('most-visited', Section.THUMB, mostVisitedInitiallyMenu, | 354 setSectionMenuMode('most-visited', Section.THUMB, mostVisitedInitiallyMenu, |
330 MENU_THUMB); | 355 MENU_THUMB); |
331 setSectionMenuMode('recently-closed', undefined, recentlyClosedInitiallyMenu, | 356 setSectionMenuMode('recently-closed', undefined, recentlyClosedInitiallyMenu, |
332 MENU_RECENT); | 357 MENU_RECENT); |
333 | 358 |
334 layoutSections(); | 359 layoutSections(); |
335 </script> | 360 </script> |
336 </html> | 361 </html> |
OLD | NEW |