file_select_helper_contacts_android.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. // Copyright 2018 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_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_
  5. #define CHROME_BROWSER_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_
  6. #include "chrome/browser/file_select_helper.h"
  7. class FileSelectHelperContactsAndroid : public FileSelectHelper {
  8. public:
  9. FileSelectHelperContactsAndroid(const FileSelectHelperContactsAndroid&) =
  10. delete;
  11. FileSelectHelperContactsAndroid& operator=(
  12. const FileSelectHelperContactsAndroid&) = delete;
  13. // A SelectFileDialog::Listener override. |file| and |index| are unused in
  14. // this override, since the file contents are passed in as string to |params|.
  15. void FileSelectedWithExtraInfo(const ui::SelectedFileInfo& file,
  16. int index,
  17. void* params) override;
  18. private:
  19. friend class FileSelectHelper;
  20. explicit FileSelectHelperContactsAndroid(Profile* profile);
  21. ~FileSelectHelperContactsAndroid() override = default;
  22. void ProcessContactsForAndroid(const std::string& contacts);
  23. void ProcessContactsForAndroidOnUIThread(const base::FilePath& temp_file);
  24. };
  25. #endif // CHROME_BROWSER_FILE_SELECT_HELPER_CONTACTS_ANDROID_H_