removable_storage_observer.h 1022 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_STORAGE_MONITOR_REMOVABLE_STORAGE_OBSERVER_H_
  5. #define COMPONENTS_STORAGE_MONITOR_REMOVABLE_STORAGE_OBSERVER_H_
  6. #include "components/storage_monitor/storage_info.h"
  7. namespace storage_monitor {
  8. // Clients use this class to register for event-based notifications of
  9. // removable storage devices attached to or removed from the system.
  10. class RemovableStorageObserver {
  11. public:
  12. // When a removable storage device is attached, this
  13. // event is triggered.
  14. virtual void OnRemovableStorageAttached(const StorageInfo& info) {}
  15. // When a removable storage device is detached, this
  16. // event is triggered.
  17. virtual void OnRemovableStorageDetached(const StorageInfo& info) {}
  18. protected:
  19. virtual ~RemovableStorageObserver() {}
  20. };
  21. } // namespace storage_monitor
  22. #endif // COMPONENTS_STORAGE_MONITOR_REMOVABLE_STORAGE_OBSERVER_H_