| 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 // chromeos::MediaDeviceNotifications listens for mount point changes and | 5 // chromeos::MediaDeviceNotifications listens for mount point changes and |
| 6 // notifies the SystemMonitor about the addition and deletion of media devices. | 6 // notifies the SystemMonitor about the addition and deletion of media devices. |
| 7 | 7 |
| 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ | 8 #ifndef CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ |
| 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ | 9 #define CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ |
| 10 | 10 |
| 11 #if !defined(OS_CHROMEOS) | 11 #if !defined(OS_CHROMEOS) |
| 12 #error "Should only be used on ChromeOS." | 12 #error "Should only be used on ChromeOS." |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 #include <map> | 15 #include <map> |
| 16 #include <string> | 16 #include <string> |
| 17 | 17 |
| 18 #include "base/basictypes.h" | 18 #include "base/basictypes.h" |
| 19 #include "base/compiler_specific.h" | 19 #include "base/compiler_specific.h" |
| 20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
| 21 #include "base/system_monitor/system_monitor.h" | 21 #include "base/system_monitor/system_monitor.h" |
| 22 #include "chrome/browser/chromeos/disks/disk_mount_manager.h" | 22 #include "chromeos/disks/disk_mount_manager.h" |
| 23 | 23 |
| 24 namespace chromeos { | 24 namespace chromeos { |
| 25 | 25 |
| 26 class MediaDeviceNotifications | 26 class MediaDeviceNotifications |
| 27 : public base::RefCountedThreadSafe<MediaDeviceNotifications>, | 27 : public base::RefCountedThreadSafe<MediaDeviceNotifications>, |
| 28 public disks::DiskMountManager::Observer { | 28 public disks::DiskMountManager::Observer { |
| 29 public: | 29 public: |
| 30 MediaDeviceNotifications(); | 30 MediaDeviceNotifications(); |
| 31 | 31 |
| 32 virtual void DiskChanged(disks::DiskMountManagerEventType event, | 32 virtual void DiskChanged(disks::DiskMountManagerEventType event, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Mapping of relevant mount points and their corresponding mount devices. | 64 // Mapping of relevant mount points and their corresponding mount devices. |
| 65 // Only accessed on the UI thread. | 65 // Only accessed on the UI thread. |
| 66 MountMap mount_map_; | 66 MountMap mount_map_; |
| 67 | 67 |
| 68 DISALLOW_COPY_AND_ASSIGN(MediaDeviceNotifications); | 68 DISALLOW_COPY_AND_ASSIGN(MediaDeviceNotifications); |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace chromeos | 71 } // namespace chromeos |
| 72 | 72 |
| 73 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ | 73 #endif // CHROME_BROWSER_MEDIA_GALLERY_MEDIA_DEVICE_NOTIFICATIONS_CHROMEOS_H_ |
| OLD | NEW |