| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @fileoverview | 6 * @fileoverview |
| 7 * Provide support for drag-and-drop operations in shaped windows. The | 7 * Provide support for drag-and-drop operations in shaped windows. The |
| 8 * standard API doesn't work because no "dragover" events are generated | 8 * standard API doesn't work because no "dragover" events are generated |
| 9 * if the mouse moves outside the window region. | 9 * if the mouse moves outside the window region. |
| 10 */ | 10 */ |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 * @private | 54 * @private |
| 55 */ | 55 */ |
| 56 this.previousDeltaY_ = 0; | 56 this.previousDeltaY_ = 0; |
| 57 | 57 |
| 58 /** | 58 /** |
| 59 * @type {boolean} | 59 * @type {boolean} |
| 60 */ | 60 */ |
| 61 this.seenNonZeroDelta_ = false; | 61 this.seenNonZeroDelta_ = false; |
| 62 | 62 |
| 63 /** | 63 /** |
| 64 * @type {function():void} | 64 * @type {function(Event):void} |
| 65 * @private | 65 * @private |
| 66 */ | 66 */ |
| 67 this.callOnMouseUp_ = this.onMouseUp_.bind(this); | 67 this.callOnMouseUp_ = this.onMouseUp_.bind(this); |
| 68 | 68 |
| 69 /** | 69 /** |
| 70 * @type {function():void} | 70 * @type {function(Event):void} |
| 71 * @private | 71 * @private |
| 72 */ | 72 */ |
| 73 this.callOnMouseMove_ = this.onMouseMove_.bind(this); | 73 this.callOnMouseMove_ = this.onMouseMove_.bind(this); |
| 74 | 74 |
| 75 element.addEventListener('mousedown', this.onMouseDown_.bind(this), false); | 75 element.addEventListener('mousedown', this.onMouseDown_.bind(this), false); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 /** | 78 /** |
| 79 * @param {Event} event | 79 * @param {Event} event |
| 80 */ | 80 */ |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 /** | 132 /** |
| 133 * @param {Event} event | 133 * @param {Event} event |
| 134 */ | 134 */ |
| 135 remoting.DragAndDrop.prototype.onMouseUp_ = function(event) { | 135 remoting.DragAndDrop.prototype.onMouseUp_ = function(event) { |
| 136 this.element_.removeEventListener('mousemove', this.callOnMouseMove_, false); | 136 this.element_.removeEventListener('mousemove', this.callOnMouseMove_, false); |
| 137 this.element_.removeEventListener('mouseup', this.callOnMouseUp_, false); | 137 this.element_.removeEventListener('mouseup', this.callOnMouseUp_, false); |
| 138 document.exitPointerLock(); | 138 document.exitPointerLock(); |
| 139 if (this.dragEnd_) { | 139 if (this.dragEnd_) { |
| 140 this.dragEnd_(); | 140 this.dragEnd_(); |
| 141 } | 141 } |
| 142 }; | 142 }; |
| OLD | NEW |