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 #include "chrome/browser/storage_monitor/removable_device_notifications_mac.h" | 5 #include "chrome/browser/storage_monitor/removable_device_notifications_mac.h" |
6 | 6 |
7 #include "chrome/browser/storage_monitor/media_device_notifications_utils.h" | 7 #include "chrome/browser/storage_monitor/media_device_notifications_utils.h" |
8 #include "content/public/browser/browser_thread.h" | 8 #include "content/public/browser/browser_thread.h" |
9 | 9 |
10 namespace chrome { | 10 namespace chrome { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 session_, | 63 session_, |
64 kDADiskDescriptionMatchVolumeMountable, | 64 kDADiskDescriptionMatchVolumeMountable, |
65 DiskDisappearedCallback, | 65 DiskDisappearedCallback, |
66 this); | 66 this); |
67 DARegisterDiskDescriptionChangedCallback( | 67 DARegisterDiskDescriptionChangedCallback( |
68 session_, | 68 session_, |
69 kDADiskDescriptionMatchVolumeMountable, | 69 kDADiskDescriptionMatchVolumeMountable, |
70 kDADiskDescriptionWatchVolumePath, | 70 kDADiskDescriptionWatchVolumePath, |
71 DiskDescriptionChangedCallback, | 71 DiskDescriptionChangedCallback, |
72 this); | 72 this); |
| 73 |
| 74 if (base::mac::IsOSLionOrLater()) { |
| 75 image_capture_device_manager_.reset(new chrome::ImageCaptureDeviceManager); |
| 76 image_capture_device_manager_->SetNotifications(receiver()); |
| 77 } |
73 } | 78 } |
74 | 79 |
75 RemovableDeviceNotificationsMac::~RemovableDeviceNotificationsMac() { | 80 RemovableDeviceNotificationsMac::~RemovableDeviceNotificationsMac() { |
76 DASessionUnscheduleFromRunLoop( | 81 DASessionUnscheduleFromRunLoop( |
77 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes); | 82 session_, CFRunLoopGetCurrent(), kCFRunLoopCommonModes); |
78 } | 83 } |
79 | 84 |
80 void RemovableDeviceNotificationsMac::UpdateDisk( | 85 void RemovableDeviceNotificationsMac::UpdateDisk( |
81 const DiskInfoMac& info, | 86 const DiskInfoMac& info, |
82 UpdateType update_type) { | 87 UpdateType update_type) { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) { | 199 it = disk_info_map_.begin(); it != disk_info_map_.end(); ++it) { |
195 if (it->second.mount_point() == mount_point) { | 200 if (it->second.mount_point() == mount_point) { |
196 *info = it->second; | 201 *info = it->second; |
197 return true; | 202 return true; |
198 } | 203 } |
199 } | 204 } |
200 return false; | 205 return false; |
201 } | 206 } |
202 | 207 |
203 } // namespace chrome | 208 } // namespace chrome |
OLD | NEW |