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