| 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 /** | 5 /** |
| 6 * Slide mode displays a single image and has a set of controls to navigate | 6 * Slide mode displays a single image and has a set of controls to navigate |
| 7 * between the images and to edit an image. | 7 * between the images and to edit an image. |
| 8 * | 8 * |
| 9 * TODO(kaznacheev): Introduce a parameter object. | 9 * TODO(kaznacheev): Introduce a parameter object. |
| 10 * | 10 * |
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 SlideMode.FULLSCREEN_TOGGLE_DELAY; | 1048 SlideMode.FULLSCREEN_TOGGLE_DELAY; |
| 1049 } | 1049 } |
| 1050 this.resumeSlideshow_(opt_interval); | 1050 this.resumeSlideshow_(opt_interval); |
| 1051 }.bind(this)); | 1051 }.bind(this)); |
| 1052 }; | 1052 }; |
| 1053 | 1053 |
| 1054 /** | 1054 /** |
| 1055 * Stop the slideshow. | 1055 * Stop the slideshow. |
| 1056 * @param {Event} opt_event Event. | 1056 * @param {Event} opt_event Event. |
| 1057 * @private | 1057 * @private |
| 1058 */ | 1058 */ |
| 1059 SlideMode.prototype.stopSlideshow_ = function(opt_event) { | 1059 SlideMode.prototype.stopSlideshow_ = function(opt_event) { |
| 1060 if (!this.isSlideshowOn_()) | 1060 if (!this.isSlideshowOn_()) |
| 1061 return; | 1061 return; |
| 1062 | 1062 |
| 1063 if (opt_event) // Caused by user action, notify the Gallery. | 1063 if (opt_event) // Caused by user action, notify the Gallery. |
| 1064 cr.dispatchSimpleEvent(this, 'useraction'); | 1064 cr.dispatchSimpleEvent(this, 'useraction'); |
| 1065 | 1065 |
| 1066 this.pauseSlideshow_(); | 1066 this.pauseSlideshow_(); |
| 1067 this.container_.removeAttribute('slideshow'); | 1067 this.container_.removeAttribute('slideshow'); |
| 1068 Gallery.getFileBrowserPrivate().isFullscreen(function(fullscreen) { | 1068 Gallery.getFileBrowserPrivate().isFullscreen(function(fullscreen) { |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 done = true; | 1263 done = true; |
| 1264 } | 1264 } |
| 1265 }.bind(this); | 1265 }.bind(this); |
| 1266 }; | 1266 }; |
| 1267 | 1267 |
| 1268 /** | 1268 /** |
| 1269 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD | 1269 * If the user touched the image and moved the finger more than SWIPE_THRESHOLD |
| 1270 * horizontally it's considered as a swipe gesture (change the current image). | 1270 * horizontally it's considered as a swipe gesture (change the current image). |
| 1271 */ | 1271 */ |
| 1272 SwipeOverlay.SWIPE_THRESHOLD = 100; | 1272 SwipeOverlay.SWIPE_THRESHOLD = 100; |
| OLD | NEW |