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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
| 11 #include <memory> |
11 #include <string> | 12 #include <string> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/files/file_path_watcher.h" | 16 #include "base/files/file_path_watcher.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 18 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
19 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h" | 19 #include "chrome/browser/chromeos/extensions/file_manager/device_event_router.h" |
20 #include "chrome/browser/chromeos/extensions/file_manager/job_event_router.h" | 20 #include "chrome/browser/chromeos/extensions/file_manager/job_event_router.h" |
21 #include "chrome/browser/chromeos/file_manager/file_watcher.h" | 21 #include "chrome/browser/chromeos/file_manager/file_watcher.h" |
22 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" | 22 #include "chrome/browser/chromeos/file_manager/fileapi_util.h" |
23 #include "chrome/browser/chromeos/file_manager/volume_manager.h" | 23 #include "chrome/browser/chromeos/file_manager/volume_manager.h" |
24 #include "chrome/browser/chromeos/file_manager/volume_manager_observer.h" | 24 #include "chrome/browser/chromeos/file_manager/volume_manager_observer.h" |
25 #include "chrome/common/extensions/api/file_manager_private.h" | 25 #include "chrome/common/extensions/api/file_manager_private.h" |
26 #include "chromeos/disks/disk_mount_manager.h" | 26 #include "chromeos/disks/disk_mount_manager.h" |
27 #include "chromeos/network/network_state_handler_observer.h" | 27 #include "chromeos/network/network_state_handler_observer.h" |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 bool immediate); | 208 bool immediate); |
209 | 209 |
210 // Sends the most recently scheduled onFileTransferUpdated event to | 210 // Sends the most recently scheduled onFileTransferUpdated event to |
211 // extensions. | 211 // extensions. |
212 // This is used for implementing ScheduledDriveFileTransferEvent(). | 212 // This is used for implementing ScheduledDriveFileTransferEvent(). |
213 void SendDriveFileTransferEvent(); | 213 void SendDriveFileTransferEvent(); |
214 | 214 |
215 base::Time last_copy_progress_event_; | 215 base::Time last_copy_progress_event_; |
216 | 216 |
217 WatcherMap file_watchers_; | 217 WatcherMap file_watchers_; |
218 scoped_ptr<PrefChangeRegistrar> pref_change_registrar_; | 218 std::unique_ptr<PrefChangeRegistrar> pref_change_registrar_; |
219 Profile* profile_; | 219 Profile* profile_; |
220 | 220 |
221 scoped_ptr<DeviceEventRouter> device_event_router_; | 221 std::unique_ptr<DeviceEventRouter> device_event_router_; |
222 scoped_ptr<JobEventRouter> job_event_router_; | 222 std::unique_ptr<JobEventRouter> job_event_router_; |
223 | 223 |
224 DispatchDirectoryChangeEventImplCallback | 224 DispatchDirectoryChangeEventImplCallback |
225 dispatch_directory_change_event_impl_; | 225 dispatch_directory_change_event_impl_; |
226 | 226 |
227 // Note: This should remain the last member so it'll be destroyed and | 227 // Note: This should remain the last member so it'll be destroyed and |
228 // invalidate the weak pointers before any other members are destroyed. | 228 // invalidate the weak pointers before any other members are destroyed. |
229 base::WeakPtrFactory<EventRouter> weak_factory_; | 229 base::WeakPtrFactory<EventRouter> weak_factory_; |
230 | 230 |
231 DISALLOW_COPY_AND_ASSIGN(EventRouter); | 231 DISALLOW_COPY_AND_ASSIGN(EventRouter); |
232 }; | 232 }; |
233 | 233 |
234 } // namespace file_manager | 234 } // namespace file_manager |
235 | 235 |
236 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ | 236 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ |
OLD | NEW |