#include "remoting/host/file_transfer/file_chooser.h"
#include <gtk/gtk.h>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/threading/sequence_bound.h"
#include "remoting/base/string_resources.h"
#include "ui/base/glib/scoped_gsignal.h"
#include "ui/base/l10n/l10n_util.h"
namespace remoting {
namespace {
class FileChooserLinux;
class GtkFileChooserOnUiThread { … };
class FileChooserLinux : public FileChooser { … };
GtkFileChooserOnUiThread::GtkFileChooserOnUiThread(
scoped_refptr<base::SequencedTaskRunner> caller_task_runner,
base::WeakPtr<FileChooserLinux> file_chooser_linux)
: … { … }
GtkFileChooserOnUiThread::~GtkFileChooserOnUiThread() { … }
void GtkFileChooserOnUiThread::Show() { … }
void GtkFileChooserOnUiThread::RunCallback(FileChooser::Result result) { … }
void GtkFileChooserOnUiThread::CleanUp() { … }
void GtkFileChooserOnUiThread::OnResponse(GtkWidget* dialog, int response_id) { … }
FileChooserLinux::FileChooserLinux(
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
ResultCallback callback)
: … { … }
void FileChooserLinux::Show() { … }
void FileChooserLinux::RunCallback(FileChooser::Result result) { … }
FileChooserLinux::~FileChooserLinux() = default;
}
std::unique_ptr<FileChooser> FileChooser::Create(
scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
ResultCallback callback) { … }
}