Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / xwalk / sysapps / device_capabilities / storage_info_provider_chromium.h
1 // Copyright (c) 2013 Intel Corporation. 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
5 #ifndef XWALK_SYSAPPS_DEVICE_CAPABILITIES_STORAGE_INFO_PROVIDER_CHROMIUM_H_
6 #define XWALK_SYSAPPS_DEVICE_CAPABILITIES_STORAGE_INFO_PROVIDER_CHROMIUM_H_
7
8 #include "components/storage_monitor/removable_storage_observer.h"
9 #include "xwalk/sysapps/device_capabilities/storage_info_provider.h"
10
11 namespace storage_monitor {
12 class RemovableStorageObserver;
13 class StorageInfo;
14 }
15
16 namespace xwalk {
17 namespace sysapps {
18
19 class StorageInfoProviderChromium
20     : public StorageInfoProvider,
21       public storage_monitor::RemovableStorageObserver {
22  public:
23   StorageInfoProviderChromium();
24   virtual ~StorageInfoProviderChromium();
25
26   scoped_ptr<SystemStorage> storage_info() const override;
27
28   // RemovableStorageObserver implementation.
29   void OnRemovableStorageAttached(
30       const storage_monitor::StorageInfo& info) override;
31   void OnRemovableStorageDetached(
32       const storage_monitor::StorageInfo& info) override;
33
34  private:
35   // StorageInfoProvider implementation.
36   void StartStorageMonitoring() override;
37   void StopStorageMonitoring() override;
38 };
39
40 }  // namespace sysapps
41 }  // namespace xwalk
42
43 #endif  // XWALK_SYSAPPS_DEVICE_CAPABILITIES_STORAGE_INFO_PROVIDER_CHROMIUM_H_