| 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/storage_monitor_win.h" | 5 #include "chrome/browser/storage_monitor/storage_monitor_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <dbt.h> | 8 #include <dbt.h> |
| 9 #include <fileapi.h> | 9 #include <fileapi.h> |
| 10 | 10 |
| 11 #include "base/win/wrapped_window_proc.h" | 11 #include "base/win/wrapped_window_proc.h" |
| 12 #include "chrome/browser/storage_monitor/portable_device_watcher_win.h" | 12 #include "chrome/browser/storage_monitor/portable_device_watcher_win.h" |
| 13 #include "chrome/browser/storage_monitor/removable_device_constants.h" | 13 #include "chrome/browser/storage_monitor/removable_device_constants.h" |
| 14 #include "chrome/browser/storage_monitor/storage_info.h" | 14 #include "chrome/browser/storage_monitor/storage_info.h" |
| 15 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h" | 15 #include "chrome/browser/storage_monitor/volume_mount_watcher_win.h" |
| 16 | 16 |
| 17 namespace chrome { | |
| 18 | |
| 19 // StorageMonitorWin ------------------------------------------------------- | 17 // StorageMonitorWin ------------------------------------------------------- |
| 20 | 18 |
| 21 StorageMonitorWin::StorageMonitorWin( | 19 StorageMonitorWin::StorageMonitorWin( |
| 22 VolumeMountWatcherWin* volume_mount_watcher, | 20 VolumeMountWatcherWin* volume_mount_watcher, |
| 23 PortableDeviceWatcherWin* portable_device_watcher) | 21 PortableDeviceWatcherWin* portable_device_watcher) |
| 24 : window_class_(0), | 22 : window_class_(0), |
| 25 instance_(NULL), | 23 instance_(NULL), |
| 26 window_(NULL), | 24 window_(NULL), |
| 27 volume_mount_watcher_(volume_mount_watcher), | 25 volume_mount_watcher_(volume_mount_watcher), |
| 28 portable_device_watcher_(portable_device_watcher) { | 26 portable_device_watcher_(portable_device_watcher) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 | 155 |
| 158 void StorageMonitorWin::OnDeviceChange(UINT event_type, LPARAM data) { | 156 void StorageMonitorWin::OnDeviceChange(UINT event_type, LPARAM data) { |
| 159 volume_mount_watcher_->OnWindowMessage(event_type, data); | 157 volume_mount_watcher_->OnWindowMessage(event_type, data); |
| 160 portable_device_watcher_->OnWindowMessage(event_type, data); | 158 portable_device_watcher_->OnWindowMessage(event_type, data); |
| 161 } | 159 } |
| 162 | 160 |
| 163 StorageMonitor* StorageMonitor::Create() { | 161 StorageMonitor* StorageMonitor::Create() { |
| 164 return new StorageMonitorWin(new VolumeMountWatcherWin(), | 162 return new StorageMonitorWin(new VolumeMountWatcherWin(), |
| 165 new PortableDeviceWatcherWin()); | 163 new PortableDeviceWatcherWin()); |
| 166 } | 164 } |
| 167 | |
| 168 } // namespace chrome | |
| OLD | NEW |