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_BROWSER_EVENT_ROUTER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 // CrosDisksClient events are being observed. | 45 // CrosDisksClient events are being observed. |
46 void ObserveFileSystemEvents(); | 46 void ObserveFileSystemEvents(); |
47 | 47 |
48 // File watch setup routines. | 48 // File watch setup routines. |
49 bool AddFileWatch(const FilePath& file_path, | 49 bool AddFileWatch(const FilePath& file_path, |
50 const FilePath& virtual_path, | 50 const FilePath& virtual_path, |
51 const std::string& extension_id); | 51 const std::string& extension_id); |
52 void RemoveFileWatch(const FilePath& file_path, | 52 void RemoveFileWatch(const FilePath& file_path, |
53 const std::string& extension_id); | 53 const std::string& extension_id); |
54 | 54 |
55 // GData mount routines. | |
satorux1
2012/08/01 20:59:01
oh no, please write better function comments. Don'
yoshiki
2012/08/01 22:23:39
Done.
| |
56 void MountGData(const base::Callback<void(bool)>& callback); | |
satorux1
2012/08/01 20:59:01
what's bool?
MountGData -> MountDrive(). Historic
yoshiki
2012/08/01 22:23:39
It is intended to return the result of mount. But
| |
57 void OnGDataAuthentication(const base::Callback<void(bool)>& callback, | |
58 gdata::GDataErrorCode error, | |
59 const std::string& tokeni); | |
60 | |
55 // CrosDisksClient::Observer overrides. | 61 // CrosDisksClient::Observer overrides. |
56 virtual void DiskChanged(chromeos::disks::DiskMountManagerEventType event, | 62 virtual void DiskChanged(chromeos::disks::DiskMountManagerEventType event, |
57 const chromeos::disks::DiskMountManager::Disk* disk) | 63 const chromeos::disks::DiskMountManager::Disk* disk) |
58 OVERRIDE; | 64 OVERRIDE; |
59 virtual void DeviceChanged(chromeos::disks::DiskMountManagerEventType event, | 65 virtual void DeviceChanged(chromeos::disks::DiskMountManagerEventType event, |
60 const std::string& device_path) OVERRIDE; | 66 const std::string& device_path) OVERRIDE; |
61 virtual void MountCompleted( | 67 virtual void MountCompleted( |
62 chromeos::disks::DiskMountManager::MountEvent event_type, | 68 chromeos::disks::DiskMountManager::MountEvent event_type, |
63 chromeos::MountError error_code, | 69 chromeos::MountError error_code, |
64 const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) | 70 const chromeos::disks::DiskMountManager::MountPointInfo& mount_info) |
(...skipping 10 matching lines...) Expand all Loading... | |
75 | 81 |
76 // GDataOperationRegistry::Observer overrides. | 82 // GDataOperationRegistry::Observer overrides. |
77 virtual void OnProgressUpdate( | 83 virtual void OnProgressUpdate( |
78 const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list) | 84 const std::vector<gdata::GDataOperationRegistry::ProgressStatus>& list) |
79 OVERRIDE; | 85 OVERRIDE; |
80 virtual void OnAuthenticationFailed() OVERRIDE; | 86 virtual void OnAuthenticationFailed() OVERRIDE; |
81 | 87 |
82 // gdata::GDataFileSystemInterface::Observer overrides. | 88 // gdata::GDataFileSystemInterface::Observer overrides. |
83 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; | 89 virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE; |
84 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; | 90 virtual void OnDocumentFeedFetched(int num_accumulated_entries) OVERRIDE; |
91 virtual void OnFileSystemMounted() OVERRIDE; | |
92 virtual void OnFileSystemUnmounting() OVERRIDE; | |
85 | 93 |
86 private: | 94 private: |
87 friend class FileBrowserEventRouterFactory; | 95 friend class FileBrowserEventRouterFactory; |
88 | 96 |
89 // Helper class for passing through file watch notification events. | 97 // Helper class for passing through file watch notification events. |
90 class FileWatcherDelegate : public base::files::FilePathWatcher::Delegate { | 98 class FileWatcherDelegate : public base::files::FilePathWatcher::Delegate { |
91 public: | 99 public: |
92 explicit FileWatcherDelegate(FileBrowserEventRouter* router); | 100 explicit FileWatcherDelegate(FileBrowserEventRouter* router); |
93 | 101 |
94 protected: | 102 protected: |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 | 231 |
224 FileBrowserEventRouterFactory(); | 232 FileBrowserEventRouterFactory(); |
225 virtual ~FileBrowserEventRouterFactory(); | 233 virtual ~FileBrowserEventRouterFactory(); |
226 | 234 |
227 // ProfileKeyedServiceFactory: | 235 // ProfileKeyedServiceFactory: |
228 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( | 236 virtual scoped_refptr<RefcountedProfileKeyedService> BuildServiceInstanceFor( |
229 Profile* profile) const OVERRIDE; | 237 Profile* profile) const OVERRIDE; |
230 }; | 238 }; |
231 | 239 |
232 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ | 240 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ |
OLD | NEW |