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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 10332049: remove ntp app install hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync it Created 8 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview New tab page 6 * @fileoverview New tab page
7 * This is the main code for the new tab page used by touch-enabled Chrome 7 * This is the main code for the new tab page used by touch-enabled Chrome
8 * browsers. For now this is still a prototype. 8 * browsers. For now this is still a prototype.
9 */ 9 */
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 loadTimeData.getString('suggestions'), 146 loadTimeData.getString('suggestions'),
147 false, 147 false,
148 (newTabView.appsPages.length > 0) ? 148 (newTabView.appsPages.length > 0) ?
149 newTabView.appsPages[0] : null); 149 newTabView.appsPages[0] : null);
150 chrome.send('getSuggestions'); 150 chrome.send('getSuggestions');
151 }; 151 };
152 document.querySelector('head').appendChild(suggestions_script); 152 document.querySelector('head').appendChild(suggestions_script);
153 } 153 }
154 154
155 var webStoreLink = loadTimeData.getString('webStoreLink'); 155 var webStoreLink = loadTimeData.getString('webStoreLink');
156 if (loadTimeData.getBoolean('isWebStoreExperimentEnabled')) { 156 var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-launcher');
157 var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-launcher'); 157 $('chrome-web-store-link').href = url;
158 $('chrome-web-store-href').href = url; 158 $('chrome-web-store-link').addEventListener('click',
159 $('chrome-web-store-href').addEventListener('click', 159 onChromeWebStoreButtonClick);
160 onChromeWebStoreButtonClick);
161
162 $('footer-content').classList.add('enable-cws-experiment');
163 }
164
165 if (loadTimeData.getBoolean('appInstallHintEnabled')) {
166 var url = appendParam(webStoreLink, 'utm_source', 'chrome-ntp-plus-icon');
167 $('app-install-hint-template').href = url;
168 }
169 160
170 if (loadTimeData.getString('login_status_message')) { 161 if (loadTimeData.getString('login_status_message')) {
171 loginBubble = new cr.ui.Bubble; 162 loginBubble = new cr.ui.Bubble;
172 loginBubble.anchorNode = $('login-container'); 163 loginBubble.anchorNode = $('login-container');
173 loginBubble.setArrowLocation(cr.ui.ArrowLocation.TOP_END); 164 loginBubble.setArrowLocation(cr.ui.ArrowLocation.TOP_END);
174 loginBubble.bubbleAlignment = 165 loginBubble.bubbleAlignment =
175 cr.ui.BubbleAlignment.BUBBLE_EDGE_TO_ANCHOR_EDGE; 166 cr.ui.BubbleAlignment.BUBBLE_EDGE_TO_ANCHOR_EDGE;
176 loginBubble.deactivateToDismissDelay = 2000; 167 loginBubble.deactivateToDismissDelay = 2000;
177 loginBubble.setCloseButtonVisible(false); 168 loginBubble.setCloseButtonVisible(false);
178 169
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 setSuggestionsPages: setSuggestionsPages, 602 setSuggestionsPages: setSuggestionsPages,
612 setRecentlyClosedTabs: setRecentlyClosedTabs, 603 setRecentlyClosedTabs: setRecentlyClosedTabs,
613 setStripeColor: setStripeColor, 604 setStripeColor: setStripeColor,
614 showNotification: showNotification, 605 showNotification: showNotification,
615 themeChanged: themeChanged, 606 themeChanged: themeChanged,
616 updateLogin: updateLogin 607 updateLogin: updateLogin
617 }; 608 };
618 }); 609 });
619 610
620 document.addEventListener('DOMContentLoaded', ntp.onLoad); 611 document.addEventListener('DOMContentLoaded', ntp.onLoad);
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/new_tab.html ('k') | chrome/browser/resources/ntp4/new_tab_theme.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698