Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / image_writer_private / removable_storage_provider.h
1 // Copyright 2013 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 CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_REMOVABLE_STORAGE_PROVIDER_H_
5 #define CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_REMOVABLE_STORAGE_PROVIDER_H_
6
7 #include "base/callback.h"
8 #include "chrome/common/extensions/api/image_writer_private.h"
9 #include "chrome/common/ref_counted_util.h"
10
11 namespace extensions {
12
13 typedef RefCountedVector<linked_ptr
14   <api::image_writer_private::RemovableStorageDevice> > StorageDeviceList;
15
16 // Abstraction for platform specific implementations of listing removable
17 // storage devices
18 class RemovableStorageProvider {
19  public:
20   typedef base::Callback<void(scoped_refptr<StorageDeviceList>, bool)>
21     DeviceListReadyCallback;
22   static void GetAllDevices(DeviceListReadyCallback callback);
23 #if defined(OS_LINUX)
24   static bool GetDevicesOnFileThread(scoped_refptr<StorageDeviceList>);
25 #endif
26 };
27
28 } // namespace extensions
29
30 #endif  // CHROME_BROWSER_EXTENSIONS_API_IMAGE_WRITER_PRIVATE_REMOVABLE_STORAGE_PROVIDER_H_