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 |
11 #include "base/files/file_path_watcher.h" | 11 #include "base/files/file_path_watcher.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/browser/chromeos/drive/drive_integration_service.h" | 13 #include "chrome/browser/chromeos/drive/drive_integration_service.h" |
14 #include "chrome/browser/chromeos/drive/file_system_observer.h" | 14 #include "chrome/browser/chromeos/drive/file_system_observer.h" |
15 #include "chrome/browser/chromeos/drive/job_list.h" | 15 #include "chrome/browser/chromeos/drive/job_list.h" |
16 #include "chrome/browser/chromeos/file_manager/file_watcher.h" | 16 #include "chrome/browser/chromeos/file_manager/file_watcher.h" |
17 #include "chrome/browser/chromeos/file_manager/volume_manager_observer.h" | 17 #include "chrome/browser/chromeos/file_manager/volume_manager_observer.h" |
18 #include "chrome/browser/drive/drive_service_interface.h" | 18 #include "chrome/browser/drive/drive_service_interface.h" |
19 #include "chromeos/disks/disk_mount_manager.h" | 19 #include "chromeos/disks/disk_mount_manager.h" |
20 #include "chromeos/network/network_state_handler_observer.h" | 20 #include "chromeos/network/network_state_handler_observer.h" |
21 | 21 |
22 class PrefChangeRegistrar; | 22 class PrefChangeRegistrar; |
23 class Profile; | 23 class Profile; |
24 | 24 |
| 25 namespace base { |
| 26 class ListValue; |
| 27 } |
| 28 |
25 namespace chromeos { | 29 namespace chromeos { |
26 class NetworkState; | 30 class NetworkState; |
27 } | 31 } |
28 | 32 |
29 namespace file_manager { | 33 namespace file_manager { |
30 | 34 |
31 class DesktopNotifications; | 35 class DesktopNotifications; |
32 class MountedDiskMonitor; | 36 class MountedDiskMonitor; |
33 | 37 |
34 // Monitors changes in disk mounts, network connection state and preferences | 38 // Monitors changes in disk mounts, network connection state and preferences |
(...skipping 24 matching lines...) Expand all Loading... |
59 // |callback| must not be null. | 63 // |callback| must not be null. |
60 void AddFileWatch(const base::FilePath& local_path, | 64 void AddFileWatch(const base::FilePath& local_path, |
61 const base::FilePath& virtual_path, | 65 const base::FilePath& virtual_path, |
62 const std::string& extension_id, | 66 const std::string& extension_id, |
63 const BoolCallback& callback); | 67 const BoolCallback& callback); |
64 | 68 |
65 // Removes a file watch at |local_path| for an extension with |extension_id|. | 69 // Removes a file watch at |local_path| for an extension with |extension_id|. |
66 void RemoveFileWatch(const base::FilePath& local_path, | 70 void RemoveFileWatch(const base::FilePath& local_path, |
67 const std::string& extension_id); | 71 const std::string& extension_id); |
68 | 72 |
| 73 // Called when a copy task is completed. |
| 74 void OnCopyCompleted( |
| 75 int copy_id, const GURL& url, base::PlatformFileError error); |
| 76 |
69 // DiskMountManager::Observer overrides. | 77 // DiskMountManager::Observer overrides. |
70 virtual void OnDiskEvent( | 78 virtual void OnDiskEvent( |
71 chromeos::disks::DiskMountManager::DiskEvent event, | 79 chromeos::disks::DiskMountManager::DiskEvent event, |
72 const chromeos::disks::DiskMountManager::Disk* disk) OVERRIDE; | 80 const chromeos::disks::DiskMountManager::Disk* disk) OVERRIDE; |
73 virtual void OnDeviceEvent( | 81 virtual void OnDeviceEvent( |
74 chromeos::disks::DiskMountManager::DeviceEvent event, | 82 chromeos::disks::DiskMountManager::DeviceEvent event, |
75 const std::string& device_path) OVERRIDE; | 83 const std::string& device_path) OVERRIDE; |
76 virtual void OnMountEvent( | 84 virtual void OnMountEvent( |
77 chromeos::disks::DiskMountManager::MountEvent event, | 85 chromeos::disks::DiskMountManager::MountEvent event, |
78 chromeos::MountError error_code, | 86 chromeos::MountError error_code, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 185 |
178 // Note: This should remain the last member so it'll be destroyed and | 186 // Note: This should remain the last member so it'll be destroyed and |
179 // invalidate the weak pointers before any other members are destroyed. | 187 // invalidate the weak pointers before any other members are destroyed. |
180 base::WeakPtrFactory<EventRouter> weak_factory_; | 188 base::WeakPtrFactory<EventRouter> weak_factory_; |
181 DISALLOW_COPY_AND_ASSIGN(EventRouter); | 189 DISALLOW_COPY_AND_ASSIGN(EventRouter); |
182 }; | 190 }; |
183 | 191 |
184 } // namespace file_manager | 192 } // namespace file_manager |
185 | 193 |
186 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ | 194 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ |
OLD | NEW |