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

Side by Side Diff: chrome/browser/resources/options/chromeos/change_picture_options.js

Issue 8541002: [cros] Initial user image loading and repeated profile image loading fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 cr.define('options', function() { 5 cr.define('options', function() {
6 6
7 var OptionsPage = options.OptionsPage; 7 var OptionsPage = options.OptionsPage;
8 var UserImagesGrid = options.UserImagesGrid; 8 var UserImagesGrid = options.UserImagesGrid;
9 var ButtonImages = UserImagesGrid.ButtonImages; 9 var ButtonImages = UserImagesGrid.ButtonImages;
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 // Old user image data (if present). 64 // Old user image data (if present).
65 this.oldImage_ = null; 65 this.oldImage_ = null;
66 }, 66 },
67 67
68 /** 68 /**
69 * Called right after the page has been shown to user. 69 * Called right after the page has been shown to user.
70 */ 70 */
71 didShowPage: function() { 71 didShowPage: function() {
72 $('images-grid').updateAndFocus(); 72 $('images-grid').updateAndFocus();
73 chrome.send('getSelectedImage'); 73 chrome.send('onPageShown');
74 }, 74 },
75 75
76 /** 76 /**
77 * Called right before the page is hidden. 77 * Called right before the page is hidden.
78 */ 78 */
79 willHidePage: function() { 79 willHidePage: function() {
80 if (this.oldImage_) { 80 if (this.oldImage_) {
81 $('images-grid').removeItem(this.oldImage_); 81 $('images-grid').removeItem(this.oldImage_);
82 this.oldImage_ = null; 82 this.oldImage_ = null;
83 } 83 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 }; 241 };
242 }); 242 });
243 243
244 // Export 244 // Export
245 return { 245 return {
246 ChangePictureOptions: ChangePictureOptions 246 ChangePictureOptions: ChangePictureOptions
247 }; 247 };
248 248
249 }); 249 });
250 250
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698