| OLD | NEW |
| 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. | 1 // Copyright 2014 The ChromeOS IME Authors. All Rights Reserved. |
| 2 // limitations under the License. | 2 // limitations under the License. |
| 3 // See the License for the specific language governing permissions and | 3 // See the License for the specific language governing permissions and |
| 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 4 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 5 // distributed under the License is distributed on an "AS-IS" BASIS, | 5 // distributed under the License is distributed on an "AS-IS" BASIS, |
| 6 // Unless required by applicable law or agreed to in writing, software | 6 // Unless required by applicable law or agreed to in writing, software |
| 7 // | 7 // |
| 8 // http://www.apache.org/licenses/LICENSE-2.0 | 8 // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 // | 9 // |
| 10 // You may obtain a copy of the License at | 10 // You may obtain a copy of the License at |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 | 390 |
| 391 | 391 |
| 392 /** | 392 /** |
| 393 * Triggers long press event. | 393 * Triggers long press event. |
| 394 * | 394 * |
| 395 * @param {!goog.events.BrowserEvent} e The event. | 395 * @param {!goog.events.BrowserEvent} e The event. |
| 396 * @private | 396 * @private |
| 397 */ | 397 */ |
| 398 PointerActionBundle.prototype.triggerLongPress_ = function(e) { | 398 PointerActionBundle.prototype.triggerLongPress_ = function(e) { |
| 399 var nativeEvt = e.getBrowserEvent(); | 399 var nativeEvt = e.getBrowserEvent(); |
| 400 if (nativeEvt.touches.length > 1) { |
| 401 return; |
| 402 } |
| 400 this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent( | 403 this.dispatchEvent(new i18n.input.chrome.inputview.events.PointerEvent( |
| 401 this.view, i18n.input.chrome.inputview.events.EventType.LONG_PRESS, | 404 this.view, i18n.input.chrome.inputview.events.EventType.LONG_PRESS, |
| 402 e.target, nativeEvt.pageX, nativeEvt.pageY)); | 405 e.target, nativeEvt.pageX, nativeEvt.pageY)); |
| 403 this.isLongPressing_ = true; | 406 this.isLongPressing_ = true; |
| 404 }; | 407 }; |
| 405 | 408 |
| 406 | 409 |
| 407 /** @override */ | 410 /** @override */ |
| 408 PointerActionBundle.prototype.disposeInternal = function() { | 411 PointerActionBundle.prototype.disposeInternal = function() { |
| 409 goog.dispose(this.longPressTimer_); | 412 goog.dispose(this.longPressTimer_); |
| 410 | 413 |
| 411 goog.base(this, 'disposeInternal'); | 414 goog.base(this, 'disposeInternal'); |
| 412 }; | 415 }; |
| 413 | 416 |
| 414 }); // goog.scope | 417 }); // goog.scope |
| OLD | NEW |