OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 // drive::FileSystemObserver overrides. | 100 // drive::FileSystemObserver overrides. |
101 virtual void OnDirectoryChanged( | 101 virtual void OnDirectoryChanged( |
102 const base::FilePath& directory_path) OVERRIDE; | 102 const base::FilePath& directory_path) OVERRIDE; |
103 | 103 |
104 // drive::DriveIntegrationServiceObserver overrides. | 104 // drive::DriveIntegrationServiceObserver overrides. |
105 virtual void OnFileSystemMounted() OVERRIDE; | 105 virtual void OnFileSystemMounted() OVERRIDE; |
106 virtual void OnFileSystemBeingUnmounted() OVERRIDE; | 106 virtual void OnFileSystemBeingUnmounted() OVERRIDE; |
107 | 107 |
108 // VolumeManagerObserver overrides. | 108 // VolumeManagerObserver overrides. |
| 109 virtual void OnDiskAdded( |
| 110 const chromeos::disks::DiskMountManager::Disk& disk, |
| 111 bool mounting) OVERRIDE; |
| 112 virtual void OnDiskRemoved( |
| 113 const chromeos::disks::DiskMountManager::Disk& disk) OVERRIDE; |
109 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE; | 114 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE; |
110 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE; | 115 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE; |
| 116 virtual void OnFormatStarted( |
| 117 const std::string& device_path, bool success) OVERRIDE; |
| 118 virtual void OnFormatCompleted( |
| 119 const std::string& device_path, bool success) OVERRIDE; |
111 | 120 |
112 private: | 121 private: |
113 typedef std::map<base::FilePath, FileWatcher*> WatcherMap; | 122 typedef std::map<base::FilePath, FileWatcher*> WatcherMap; |
114 | 123 |
115 // USB mount event handlers. | 124 // USB mount event handlers. |
116 void OnDiskAdded(const chromeos::disks::DiskMountManager::Disk* disk); | |
117 void OnDiskRemoved(const chromeos::disks::DiskMountManager::Disk* disk); | |
118 void OnDiskMounted(const chromeos::disks::DiskMountManager::Disk* disk); | 125 void OnDiskMounted(const chromeos::disks::DiskMountManager::Disk* disk); |
119 void OnDiskUnmounted(const chromeos::disks::DiskMountManager::Disk* disk); | 126 void OnDiskUnmounted(const chromeos::disks::DiskMountManager::Disk* disk); |
120 void OnFormatStarted(const std::string& device_path, bool success); | |
121 void OnFormatCompleted(const std::string& device_path, bool success); | |
122 | 127 |
123 // Called on change to kExternalStorageDisabled pref. | 128 // Called on change to kExternalStorageDisabled pref. |
124 void OnExternalStorageDisabledChanged(); | 129 void OnExternalStorageDisabledChanged(); |
125 | 130 |
126 // Called when prefs related to file manager change. | 131 // Called when prefs related to file manager change. |
127 void OnFileManagerPrefsChanged(); | 132 void OnFileManagerPrefsChanged(); |
128 | 133 |
129 // Process file watch notifications. | 134 // Process file watch notifications. |
130 void HandleFileWatchNotification(const base::FilePath& path, | 135 void HandleFileWatchNotification(const base::FilePath& path, |
131 bool got_error); | 136 bool got_error); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 177 |
173 // Note: This should remain the last member so it'll be destroyed and | 178 // Note: This should remain the last member so it'll be destroyed and |
174 // invalidate the weak pointers before any other members are destroyed. | 179 // invalidate the weak pointers before any other members are destroyed. |
175 base::WeakPtrFactory<EventRouter> weak_factory_; | 180 base::WeakPtrFactory<EventRouter> weak_factory_; |
176 DISALLOW_COPY_AND_ASSIGN(EventRouter); | 181 DISALLOW_COPY_AND_ASSIGN(EventRouter); |
177 }; | 182 }; |
178 | 183 |
179 } // namespace file_manager | 184 } // namespace file_manager |
180 | 185 |
181 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ | 186 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ |
OLD | NEW |