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

Side by Side Diff: chrome/browser/resources/sync_promo/sync_promo.js

Issue 9225053: Add a blocking version of the sync promo dialog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 10 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
« no previous file with comments | « chrome/browser/resources/sync_promo/sync_promo.css ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // TODO(sail): Refactor options_page and remove this include. 5 // TODO(sail): Refactor options_page and remove this include.
6 <include src="../options/options_page.js"/> 6 <include src="../options/options_page.js"/>
7 <include src="../sync_setup_overlay.js"/> 7 <include src="../sync_setup_overlay.js"/>
8 8
9 cr.define('sync_promo', function() { 9 cr.define('sync_promo', function() {
10 /** 10 /**
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 $('confirm-everything-cancel').addEventListener('click', cancelFunc); 138 $('confirm-everything-cancel').addEventListener('click', cancelFunc);
139 $('choose-datatypes-cancel').addEventListener('click', cancelFunc); 139 $('choose-datatypes-cancel').addEventListener('click', cancelFunc);
140 140
141 this.infographic_ = $('promo-infographic'); 141 this.infographic_ = $('promo-infographic');
142 this.learnMore_ = $('promo-information'); 142 this.learnMore_ = $('promo-information');
143 143
144 this.infographic_.addEventListener('webkitTransitionEnd', 144 this.infographic_.addEventListener('webkitTransitionEnd',
145 this.toggleHidden_.bind(this)); 145 this.toggleHidden_.bind(this));
146 this.learnMore_.addEventListener('webkitTransitionEnd', 146 this.learnMore_.addEventListener('webkitTransitionEnd',
147 this.toggleHidden_.bind(this)); 147 this.toggleHidden_.bind(this));
148
149 document.body.classList.add('loaded');
148 }, 150 },
149 151
150 /** 152 /**
151 * Called when the page is unloading to record number of times a user tried 153 * Called when the page is unloading to record number of times a user tried
152 * to sign in and if they left while a throbber was running. 154 * to sign in and if they left while a throbber was running.
153 * @private 155 * @private
154 */ 156 */
155 recordPageViewActions_: function() { 157 recordPageViewActions_: function() {
156 chrome.send('SyncPromo:RecordSignInAttempts', [this.signInAttempts_]); 158 chrome.send('SyncPromo:RecordSignInAttempts', [this.signInAttempts_]);
157 if (this.throbberStart_) 159 if (this.throbberStart_)
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return { 284 return {
283 SyncPromo: SyncPromo 285 SyncPromo: SyncPromo
284 }; 286 };
285 }); 287 });
286 288
287 var OptionsPage = options.OptionsPage; 289 var OptionsPage = options.OptionsPage;
288 var SyncSetupOverlay = sync_promo.SyncPromo; 290 var SyncSetupOverlay = sync_promo.SyncPromo;
289 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize); 291 window.addEventListener('DOMContentLoaded', sync_promo.SyncPromo.initialize);
290 window.addEventListener('beforeunload', 292 window.addEventListener('beforeunload',
291 sync_promo.SyncPromo.recordPageViewActions.bind(sync_promo.SyncPromo)); 293 sync_promo.SyncPromo.recordPageViewActions.bind(sync_promo.SyncPromo));
OLDNEW
« no previous file with comments | « chrome/browser/resources/sync_promo/sync_promo.css ('k') | chrome/browser/ui/browser_dialogs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698