OLD | NEW |
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 cr.define('options', function() { | 5 cr.define('options', function() { |
6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
8 var UserImagesGrid = options.UserImagesGrid; | 8 var UserImagesGrid = options.UserImagesGrid; |
9 var ButtonImages = UserImagesGrid.ButtonImages; | 9 var ButtonImages = UserImagesGrid.ButtonImages; |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 $('take-photo').addEventListener( | 81 $('take-photo').addEventListener( |
82 'click', this.handleTakePhoto_.bind(this)); | 82 'click', this.handleTakePhoto_.bind(this)); |
83 $('discard-photo').addEventListener( | 83 $('discard-photo').addEventListener( |
84 'click', this.handleDiscardPhoto_.bind(this)); | 84 'click', this.handleDiscardPhoto_.bind(this)); |
85 | 85 |
86 // Toggle 'animation' class for the duration of WebKit transition. | 86 // Toggle 'animation' class for the duration of WebKit transition. |
87 $('flip-photo').addEventListener( | 87 $('flip-photo').addEventListener( |
88 'click', this.handleFlipPhoto_.bind(this)); | 88 'click', this.handleFlipPhoto_.bind(this)); |
89 $('user-image-stream-crop').addEventListener( | 89 $('user-image-stream-crop').addEventListener( |
90 'webkitTransitionEnd', function(e) { | 90 'transitionend', function(e) { |
91 previewElement.classList.remove('animation'); | 91 previewElement.classList.remove('animation'); |
92 }); | 92 }); |
93 $('user-image-preview-img').addEventListener( | 93 $('user-image-preview-img').addEventListener( |
94 'webkitTransitionEnd', function(e) { | 94 'transitionend', function(e) { |
95 previewElement.classList.remove('animation'); | 95 previewElement.classList.remove('animation'); |
96 }); | 96 }); |
97 | 97 |
98 // Old user image data (if present). | 98 // Old user image data (if present). |
99 this.oldImage_ = null; | 99 this.oldImage_ = null; |
100 | 100 |
101 $('change-picture-overlay-confirm').addEventListener( | 101 $('change-picture-overlay-confirm').addEventListener( |
102 'click', this.closeOverlay_.bind(this)); | 102 'click', this.closeOverlay_.bind(this)); |
103 | 103 |
104 chrome.send('onChangePicturePageInitialized'); | 104 chrome.send('onChangePicturePageInitialized'); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 'setProfileImage', | 322 'setProfileImage', |
323 'setSelectedImage', | 323 'setSelectedImage', |
324 ]); | 324 ]); |
325 | 325 |
326 // Export | 326 // Export |
327 return { | 327 return { |
328 ChangePictureOptions: ChangePictureOptions | 328 ChangePictureOptions: ChangePictureOptions |
329 }; | 329 }; |
330 | 330 |
331 }); | 331 }); |
OLD | NEW |