select_file_dialog_factory.h 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (c) 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 UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_FACTORY_H_
  5. #define UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_FACTORY_H_
  6. #include "ui/shell_dialogs/select_file_dialog.h"
  7. #include "ui/shell_dialogs/shell_dialogs_export.h"
  8. namespace ui {
  9. class SelectFilePolicy;
  10. // Some chrome components want to create their own SelectFileDialog objects
  11. // (for example, using an extension to provide the select file dialog needs to
  12. // live in chrome/ due to the extension dependency.)
  13. //
  14. // They can implement a factory which creates their SelectFileDialog.
  15. class SHELL_DIALOGS_EXPORT SelectFileDialogFactory {
  16. public:
  17. virtual ~SelectFileDialogFactory();
  18. virtual SelectFileDialog* Create(
  19. ui::SelectFileDialog::Listener* listener,
  20. std::unique_ptr<ui::SelectFilePolicy> policy) = 0;
  21. };
  22. } // namespace ui
  23. #endif // UI_SHELL_DIALOGS_SELECT_FILE_DIALOG_FACTORY_H_