fake_file_chooser.h 916 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2019 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 REMOTING_HOST_FILE_TRANSFER_FAKE_FILE_CHOOSER_H_
  5. #define REMOTING_HOST_FILE_TRANSFER_FAKE_FILE_CHOOSER_H_
  6. #include "remoting/host/file_transfer/file_chooser.h"
  7. namespace remoting {
  8. class FakeFileChooser : public FileChooser {
  9. public:
  10. explicit FakeFileChooser(ResultCallback callback);
  11. FakeFileChooser(const FakeFileChooser&) = delete;
  12. FakeFileChooser& operator=(const FakeFileChooser&) = delete;
  13. ~FakeFileChooser() override;
  14. // FileChooser implementation.
  15. void Show() override;
  16. // The result that usages of FakeFileChooser should return.
  17. static void SetResult(FileChooser::Result result);
  18. private:
  19. ResultCallback callback_;
  20. };
  21. } // namespace remoting
  22. #endif // REMOTING_HOST_FILE_TRANSFER_FAKE_FILE_CHOOSER_H_