| 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_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_
H_ | 5 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_
H_ |
| 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_
H_ | 6 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_WIN_
H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/system_monitor/system_monitor.h" | |
| 12 #include "chrome/browser/system_monitor/removable_storage_notifications.h" | 11 #include "chrome/browser/system_monitor/removable_storage_notifications.h" |
| 13 | 12 |
| 14 class FilePath; | 13 class FilePath; |
| 15 | 14 |
| 16 namespace chrome { | 15 namespace chrome { |
| 17 | 16 |
| 18 namespace test { | 17 namespace test { |
| 19 class TestRemovableDeviceNotificationsWindowWin; | 18 class TestRemovableDeviceNotificationsWindowWin; |
| 20 } | 19 } |
| 21 | 20 |
| 22 class PortableDeviceWatcherWin; | 21 class PortableDeviceWatcherWin; |
| 23 class VolumeMountWatcherWin; | 22 class VolumeMountWatcherWin; |
| 24 | 23 |
| 25 class RemovableDeviceNotificationsWindowWin | 24 class RemovableDeviceNotificationsWindowWin |
| 26 : public RemovableStorageNotifications { | 25 : public RemovableStorageNotifications { |
| 27 public: | 26 public: |
| 28 // Creates an instance of RemovableDeviceNotificationsWindowWin. Should only | 27 // Creates an instance of RemovableDeviceNotificationsWindowWin. Should only |
| 29 // be called by browser start up code. Use GetInstance() instead. | 28 // be called by browser start up code. Use GetInstance() instead. |
| 30 static RemovableDeviceNotificationsWindowWin* Create(); | 29 static RemovableDeviceNotificationsWindowWin* Create(); |
| 31 | 30 |
| 32 virtual ~RemovableDeviceNotificationsWindowWin(); | 31 virtual ~RemovableDeviceNotificationsWindowWin(); |
| 33 | 32 |
| 34 // Must be called after the file thread is created. | 33 // Must be called after the file thread is created. |
| 35 void Init(); | 34 void Init(); |
| 36 | 35 |
| 37 // RemovableStorageNotifications: | 36 // RemovableStorageNotifications: |
| 38 virtual bool GetDeviceInfoForPath( | 37 virtual bool GetDeviceInfoForPath( |
| 39 const FilePath& path, | 38 const FilePath& path, |
| 40 base::SystemMonitor::RemovableStorageInfo* device_info) const OVERRIDE; | 39 StorageInfo* device_info) const OVERRIDE; |
| 41 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE; | 40 virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE; |
| 42 virtual bool GetMTPStorageInfoFromDeviceId( | 41 virtual bool GetMTPStorageInfoFromDeviceId( |
| 43 const std::string& storage_device_id, | 42 const std::string& storage_device_id, |
| 44 string16* device_location, | 43 string16* device_location, |
| 45 string16* storage_object_id) const OVERRIDE; | 44 string16* storage_object_id) const OVERRIDE; |
| 46 | 45 |
| 47 private: | 46 private: |
| 48 class PortableDeviceNotifications; | 47 class PortableDeviceNotifications; |
| 49 friend class test::TestRemovableDeviceNotificationsWindowWin; | 48 friend class test::TestRemovableDeviceNotificationsWindowWin; |
| 50 | 49 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // The portable device watcher, used to manage media transfer protocol | 84 // The portable device watcher, used to manage media transfer protocol |
| 86 // devices. | 85 // devices. |
| 87 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_; | 86 scoped_ptr<PortableDeviceWatcherWin> portable_device_watcher_; |
| 88 | 87 |
| 89 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsWindowWin); | 88 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsWindowWin); |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 } // namespace chrome | 91 } // namespace chrome |
| 93 | 92 |
| 94 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_W
IN_H_ | 93 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_WINDOW_W
IN_H_ |
| OLD | NEW |