chromium/ui/shell_dialogs/select_file_dialog.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/shell_dialogs/select_file_dialog.h"

#include <stddef.h>
#include <algorithm>

#include "base/check.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
#include "base/sequence_checker.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversion_utils.h"
#include "base/task/single_thread_task_runner.h"
#include "base/third_party/icu/icu_utf.h"
#include "build/build_config.h"
#include "ui/shell_dialogs/select_file_dialog_factory.h"
#include "ui/shell_dialogs/select_file_policy.h"
#include "ui/shell_dialogs/selected_file_info.h"
#include "url/gurl.h"

namespace {

// Optional dialog factory. Leaked.
ui::SelectFileDialogFactory* dialog_factory_ =;

void TruncateStringToSize(base::FilePath::StringType* string, size_t size) {}

}  // namespace

namespace ui {

void SelectFileDialog::Listener::MultiFilesSelected(
    const std::vector<SelectedFileInfo>& files) {}

SelectFileDialog::FileTypeInfo::FileTypeInfo() = default;

SelectFileDialog::FileTypeInfo::FileTypeInfo(const FileTypeInfo& other) =
    default;

SelectFileDialog::FileTypeInfo::FileTypeInfo(FileExtensionList in_extensions)
    :{}

SelectFileDialog::FileTypeInfo::FileTypeInfo(
    std::vector<FileExtensionList> in_extensions)
    :{}

SelectFileDialog::FileTypeInfo::FileTypeInfo(
    std::vector<FileExtensionList> in_extensions,
    std::vector<std::u16string> in_descriptions)
    :{}

SelectFileDialog::FileTypeInfo::~FileTypeInfo() = default;

// static
void SelectFileDialog::SetFactory(
    std::unique_ptr<ui::SelectFileDialogFactory> factory) {}

// static
scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
    Listener* listener,
    std::unique_ptr<ui::SelectFilePolicy> policy) {}

base::FilePath SelectFileDialog::GetShortenedFilePath(
    const base::FilePath& path) {}

#if BUILDFLAG(IS_ANDROID)
// These are overridden by Android's SelectFileDialog subclass.
void SelectFileDialog::SetAcceptTypes(std::vector<std::u16string> types) {}
void SelectFileDialog::SetUseMediaCapture(bool use_media_capture) {}
void SelectFileDialog::SetOpenWritable(bool open_writable) {}
#endif

void SelectFileDialog::SelectFile(
    Type type,
    const std::u16string& title,
    const base::FilePath& default_path,
    const FileTypeInfo* file_types,
    int file_type_index,
    const base::FilePath::StringType& default_extension,
    gfx::NativeWindow owning_window,
    const GURL* caller) {}

bool SelectFileDialog::HasMultipleFileTypeChoices() {}

SelectFileDialog::SelectFileDialog(Listener* listener,
                                   std::unique_ptr<ui::SelectFilePolicy> policy)
    :{}

SelectFileDialog::~SelectFileDialog() {}

void SelectFileDialog::CancelFileSelection() {}

}  // namespace ui