Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: chrome/browser/chromeos/extensions/file_manager/event_router.h

Issue 507293002: Enrich fileBrowserPrivate.onFileTransfersUpdated event to support displaying total number of jobs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/extensions/file_manager/event_router.h
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.h b/chrome/browser/chromeos/extensions/file_manager/event_router.h
index 42e65b60b5f4865cdf63fe543ebc6ae7bf0b849f..b9a1eccb33a6a73f086cb9810f399476d77022ba 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.h
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h
@@ -182,11 +182,6 @@ class EventRouter
void ShowRemovableDeviceInFileManager(VolumeType type,
const base::FilePath& mount_path);
- // Sends onFileTranferUpdated to extensions if needed. If |always| is true,
- // it sends the event always. Otherwise, it sends the event if enough time has
- // passed from the previous event so as not to make extension busy.
- void SendDriveFileTransferEvent(bool always);
-
// Manages the list of currently active Drive file transfer jobs.
struct DriveJobInfoWithStatus {
DriveJobInfoWithStatus();
@@ -195,9 +190,20 @@ class EventRouter
drive::JobInfo job_info;
std::string status;
};
+
+ // Schedule onFileTransferUpdated event.
+ void ScheduleDriveFileTransferEvent(const drive::JobInfo& job_info,
+ const std::string& status,
+ bool immediate);
+
+ // Sends onFileTranferUpdated to extensions if after nextSendTime_.
+ void SendDriveFileTransferEvent();
+
std::map<drive::JobID, DriveJobInfoWithStatus> drive_jobs_;
+ scoped_ptr<DriveJobInfoWithStatus> drive_job_info_with_status_;
base::Time last_file_transfer_event_;
base::Time last_copy_progress_event_;
+ base::Time next_send_time_;
hirono 2014/09/01 07:29:02 Please include information for the kind of event (
iseki 2014/09/01 09:26:40 Done.
WatcherMap file_watchers_;
scoped_ptr<PrefChangeRegistrar> pref_change_registrar_;

Powered by Google App Engine
This is Rietveld 408576698