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

Side by Side Diff: chrome/browser/chromeos/extensions/file_browser_event_router.h

Issue 7457001: Adding support for mount point different from removable devices to MountLibrary (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: some compile issues Created 9 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 28 matching lines...) Expand all
39 const FilePath& virtual_path, 39 const FilePath& virtual_path,
40 const std::string& extension_id); 40 const std::string& extension_id);
41 void RemoveFileWatch(const FilePath& file_path, 41 void RemoveFileWatch(const FilePath& file_path,
42 const std::string& extension_id); 42 const std::string& extension_id);
43 43
44 // MountLibrary::Observer overrides. 44 // MountLibrary::Observer overrides.
45 virtual void DiskChanged(chromeos::MountLibraryEventType event, 45 virtual void DiskChanged(chromeos::MountLibraryEventType event,
46 const chromeos::MountLibrary::Disk* disk) OVERRIDE; 46 const chromeos::MountLibrary::Disk* disk) OVERRIDE;
47 virtual void DeviceChanged(chromeos::MountLibraryEventType event, 47 virtual void DeviceChanged(chromeos::MountLibraryEventType event,
48 const std::string& device_path) OVERRIDE; 48 const std::string& device_path) OVERRIDE;
49 virtual void MountCompleted(chromeos::MountLibrary::MountEvent event_type,
50 chromeos::MountError error_code,
51 const std::string& source_path,
zel 2011/07/22 23:54:21 pass MountPointInfo here instead of these 3 params
52 chromeos::MountType type,
53 const std::string& mount_path) OVERRIDE;
49 54
50 private: 55 private:
51 typedef std::map<std::string, linked_ptr<chromeos::SystemNotification> > 56 typedef std::map<std::string, linked_ptr<chromeos::SystemNotification> >
52 NotificationMap; 57 NotificationMap;
53 typedef std::map<std::string, std::string> MountPointMap; 58 typedef std::map<std::string, std::string> MountPointMap;
54 typedef struct FileWatcherExtensions { 59 typedef struct FileWatcherExtensions {
55 FileWatcherExtensions(const FilePath& path, const std::string& extension_id) { 60 FileWatcherExtensions(const FilePath& path, const std::string& extension_id) {
56 file_watcher.reset(new base::files::FilePathWatcher()); 61 file_watcher.reset(new base::files::FilePathWatcher());
57 virtual_path = path; 62 virtual_path = path;
58 extensions.insert(extension_id); 63 extensions.insert(extension_id);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void HandleFileWatchNotification(const FilePath& path, 101 void HandleFileWatchNotification(const FilePath& path,
97 bool got_error); 102 bool got_error);
98 103
99 // Sends folder change event. 104 // Sends folder change event.
100 void DispatchFolderChangeEvent(const FilePath& path, bool error, 105 void DispatchFolderChangeEvent(const FilePath& path, bool error,
101 const std::set<std::string>& extensions); 106 const std::set<std::string>& extensions);
102 107
103 // Sends filesystem changed extension message to all renderers. 108 // Sends filesystem changed extension message to all renderers.
104 void DispatchMountEvent(const chromeos::MountLibrary::Disk* disk, bool added); 109 void DispatchMountEvent(const chromeos::MountLibrary::Disk* disk, bool added);
105 110
111 void DispatchMountCompletedEvent(chromeos::MountLibrary::MountEvent event,
112 chromeos::MountError error_code,
113 const std::string& source_path,
zel 2011/07/22 23:54:21 pass MountPointInfo here instead of these 3 params
114 chromeos::MountType mount_type,
115 const std::string& mount_path);
116
106 void RemoveBrowserFromVector(const std::string& path); 117 void RemoveBrowserFromVector(const std::string& path);
107 118
108 // Used to create a window of a standard size, and add it to a list 119 // Used to create a window of a standard size, and add it to a list
109 // of tracked browser windows in case that device goes away. 120 // of tracked browser windows in case that device goes away.
110 void OpenFileBrowse(const std::string& url, 121 void OpenFileBrowse(const std::string& url,
111 const std::string& device_path, 122 const std::string& device_path,
112 bool small); 123 bool small);
113 124
114 // Show/hide desktop notifications. 125 // Show/hide desktop notifications.
115 void ShowDeviceNotification(const std::string& system_path, 126 void ShowDeviceNotification(const std::string& system_path,
116 int icon_resource_id, 127 int icon_resource_id,
117 const string16& message); 128 const string16& message);
118 void HideDeviceNotification(const std::string& system_path); 129 void HideDeviceNotification(const std::string& system_path);
119 130
120 scoped_refptr<FileWatcherDelegate> delegate_; 131 scoped_refptr<FileWatcherDelegate> delegate_;
121 MountPointMap mounted_devices_; 132 MountPointMap mounted_devices_;
122 NotificationMap notifications_; 133 NotificationMap notifications_;
123 WatcherMap file_watchers_; 134 WatcherMap file_watchers_;
124 Profile* profile_; 135 Profile* profile_;
125 base::Lock lock_; 136 base::Lock lock_;
126 137
127 DISALLOW_COPY_AND_ASSIGN(ExtensionFileBrowserEventRouter); 138 DISALLOW_COPY_AND_ASSIGN(ExtensionFileBrowserEventRouter);
128 }; 139 };
129 140
130 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_ 141 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_BROWSER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros/mount_library.cc ('k') | chrome/browser/chromeos/extensions/file_browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698