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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/event_router.h

Issue 23477070: Move OnFileSystemMounted/BeingUnmounted to VolumeManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 22 matching lines...) Expand all
33 } 33 }
34 34
35 namespace file_manager { 35 namespace file_manager {
36 36
37 class DesktopNotifications; 37 class DesktopNotifications;
38 38
39 // Monitors changes in disk mounts, network connection state and preferences 39 // Monitors changes in disk mounts, network connection state and preferences
40 // affecting File Manager. Dispatches appropriate File Browser events. 40 // affecting File Manager. Dispatches appropriate File Browser events.
41 class EventRouter 41 class EventRouter
42 : public chromeos::NetworkStateHandlerObserver, 42 : public chromeos::NetworkStateHandlerObserver,
43 public drive::DriveIntegrationServiceObserver,
44 public drive::FileSystemObserver, 43 public drive::FileSystemObserver,
45 public drive::JobListObserver, 44 public drive::JobListObserver,
46 public drive::DriveServiceObserver, 45 public drive::DriveServiceObserver,
47 public VolumeManagerObserver { 46 public VolumeManagerObserver {
48 public: 47 public:
49 explicit EventRouter(Profile* profile); 48 explicit EventRouter(Profile* profile);
50 virtual ~EventRouter(); 49 virtual ~EventRouter();
51 50
52 void Shutdown(); 51 void Shutdown();
53 52
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void OnJobDone(const drive::JobInfo& job_info, 84 virtual void OnJobDone(const drive::JobInfo& job_info,
86 drive::FileError error) OVERRIDE; 85 drive::FileError error) OVERRIDE;
87 86
88 // drive::DriveServiceObserver overrides. 87 // drive::DriveServiceObserver overrides.
89 virtual void OnRefreshTokenInvalid() OVERRIDE; 88 virtual void OnRefreshTokenInvalid() OVERRIDE;
90 89
91 // drive::FileSystemObserver overrides. 90 // drive::FileSystemObserver overrides.
92 virtual void OnDirectoryChanged( 91 virtual void OnDirectoryChanged(
93 const base::FilePath& directory_path) OVERRIDE; 92 const base::FilePath& directory_path) OVERRIDE;
94 93
95 // drive::DriveIntegrationServiceObserver overrides.
96 // TODO(hidehiko): Move these to VolumeManager.
97 virtual void OnFileSystemMounted() OVERRIDE;
98 virtual void OnFileSystemBeingUnmounted() OVERRIDE;
99
100 // VolumeManagerObserver overrides. 94 // VolumeManagerObserver overrides.
101 virtual void OnDiskAdded( 95 virtual void OnDiskAdded(
102 const chromeos::disks::DiskMountManager::Disk& disk, 96 const chromeos::disks::DiskMountManager::Disk& disk,
103 bool mounting) OVERRIDE; 97 bool mounting) OVERRIDE;
104 virtual void OnDiskRemoved( 98 virtual void OnDiskRemoved(
105 const chromeos::disks::DiskMountManager::Disk& disk) OVERRIDE; 99 const chromeos::disks::DiskMountManager::Disk& disk) OVERRIDE;
106 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE; 100 virtual void OnDeviceAdded(const std::string& device_path) OVERRIDE;
107 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE; 101 virtual void OnDeviceRemoved(const std::string& device_path) OVERRIDE;
108 virtual void OnVolumeMounted(chromeos::MountError error_code, 102 virtual void OnVolumeMounted(chromeos::MountError error_code,
109 const VolumeInfo& volume_info, 103 const VolumeInfo& volume_info,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 153
160 // Note: This should remain the last member so it'll be destroyed and 154 // Note: This should remain the last member so it'll be destroyed and
161 // invalidate the weak pointers before any other members are destroyed. 155 // invalidate the weak pointers before any other members are destroyed.
162 base::WeakPtrFactory<EventRouter> weak_factory_; 156 base::WeakPtrFactory<EventRouter> weak_factory_;
163 DISALLOW_COPY_AND_ASSIGN(EventRouter); 157 DISALLOW_COPY_AND_ASSIGN(EventRouter);
164 }; 158 };
165 159
166 } // namespace file_manager 160 } // namespace file_manager
167 161
168 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_ 162 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698