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

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

Issue 490643005: Files.app: Start to use DeviceEventRouter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. 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 30cc62389d6a6e4191b5393ac67dcaf02f356480..42e65b60b5f4865cdf63fe543ebc6ae7bf0b849f 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.h
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.h
@@ -47,6 +47,7 @@ class FileChange;
}
namespace file_manager {
+class DeviceEventRouter;
// Monitors changes in disk mounts, network connection state and preferences
// affecting File Manager. Dispatches appropriate File Browser events.
@@ -130,7 +131,6 @@ class EventRouter
bool is_remounting) OVERRIDE;
virtual void OnVolumeUnmounted(chromeos::MountError error_code,
const VolumeInfo& volume_info) OVERRIDE;
- virtual void OnHardUnplugged(const std::string& device_path) OVERRIDE;
virtual void OnFormatStarted(
const std::string& device_path, bool success) OVERRIDE;
virtual void OnFormatCompleted(
@@ -174,8 +174,7 @@ class EventRouter
void DispatchMountCompletedEvent(
extensions::api::file_browser_private::MountCompletedEventType event_type,
chromeos::MountError error,
- const VolumeInfo& volume_info,
- bool is_remounting);
+ const VolumeInfo& volume_info);
// If needed, opens a file manager window for the removable device mounted at
// |mount_path|. Disk.mount_path() is empty, since it is being filled out
@@ -183,12 +182,6 @@ class EventRouter
void ShowRemovableDeviceInFileManager(VolumeType type,
const base::FilePath& mount_path);
- // Dispatches an onDeviceChanged event containing |type| and |path| to
- // extensions.
- void DispatchDeviceEvent(
- extensions::api::file_browser_private::DeviceEventType type,
- const std::string& 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.
@@ -213,6 +206,8 @@ class EventRouter
content::NotificationRegistrar notification_registrar_;
bool multi_user_window_manager_observer_registered_;
+ scoped_ptr<DeviceEventRouter> device_event_router_;
+
// Note: This should remain the last member so it'll be destroyed and
// invalidate the weak pointers before any other members are destroyed.
base::WeakPtrFactory<EventRouter> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698