summaryrefslogtreecommitdiffstats
path: root/components/storage_monitor/test_storage_monitor_win.h
blob: 12a34baf3f9562c15463d60896ecd4e09c7b5c0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// This file contains a subclass of StorageMonitorWin to simulate device
// changed events for testing.

#ifndef COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_WIN_H_
#define COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_WIN_H_

#include <windows.h>

#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "components/storage_monitor/storage_monitor_win.h"

namespace storage_monitor {

class TestPortableDeviceWatcherWin;
class TestVolumeMountWatcherWin;

class TestStorageMonitorWin: public StorageMonitorWin {
 public:
  TestStorageMonitorWin(
      TestVolumeMountWatcherWin* volume_mount_watcher,
      TestPortableDeviceWatcherWin* portable_device_watcher);

  ~TestStorageMonitorWin() override;

  void InjectDeviceChange(UINT event_type, LPARAM data);

  VolumeMountWatcherWin* volume_mount_watcher();

  Receiver* receiver() const override;

 private:
  DISALLOW_COPY_AND_ASSIGN(TestStorageMonitorWin);
};

}  // namespace storage_monitor

#endif  // COMPONENTS_STORAGE_MONITOR_TEST_STORAGE_MONITOR_WIN_H_