From f1e1b029359ff01b1be2dc234915b7e3463f0f6d Mon Sep 17 00:00:00 2001 From: dpapad Date: Tue, 12 Mar 2019 22:47:21 +0000 Subject: [PATCH] File Manager: Remove inaccurate @extends {cr.EventTarget} annotation. FileOperationManagerImpl class was falsely reporting to the JS compiler that it is a cr.EventTarget subclass, even though it was not. Bug: 854268 Change-Id: Ib891cbabebeca5fb1475e9a8d0f5037e873a20ed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1515911 Commit-Queue: Luciano Pacheco Auto-Submit: Demetrios Papadopoulos Reviewed-by: Luciano Pacheco Cr-Commit-Position: refs/heads/master@{#640128} --- .../externs/background/file_operation_manager.js | 3 ++- .../file_manager/background/js/file_operation_manager.js | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/file_manager/externs/background/file_operation_manager.js b/ui/file_manager/externs/background/file_operation_manager.js index 801678f1682379..84a53f177e48f8 100644 --- a/ui/file_manager/externs/background/file_operation_manager.js +++ b/ui/file_manager/externs/background/file_operation_manager.js @@ -4,7 +4,8 @@ /** * FileOperationManager: manager of file operations. Implementations of this - * interface must @extends {cr.EventTarget}. + * interface must @extends {cr.EventTarget} or implement the EventTarget API on + * their own. * * @interface * @extends {EventTarget} diff --git a/ui/file_manager/file_manager/background/js/file_operation_manager.js b/ui/file_manager/file_manager/background/js/file_operation_manager.js index f1ba43582408ab..5c1ed7e8ce8e6c 100644 --- a/ui/file_manager/file_manager/background/js/file_operation_manager.js +++ b/ui/file_manager/file_manager/background/js/file_operation_manager.js @@ -8,7 +8,6 @@ * @constructor * @struct * @implements {FileOperationManager} - * @extends {cr.EventTarget} */ function FileOperationManagerImpl() { /** @@ -69,6 +68,12 @@ FileOperationManagerImpl.prototype.removeEventListener = function( this.eventRouter_.removeEventListener(type, handler); }; +/** @override */ +FileOperationManagerImpl.prototype.dispatchEvent = function() { + // Not used. Just need this to satisfy the compiler @implements + // FileOperationManager interface. +}; + /** * Checks if there are any tasks in the queue. * @return {boolean} True, if there are any tasks.