| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |