/* * Copyright (c) 2020, Andreas Kling * Copyright (c) 2022, the SerenityOS developers. * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include namespace Browser { class DownloadWidget final : public GUI::Widget { C_OBJECT(DownloadWidget); public: virtual ~DownloadWidget() override = default; private: explicit DownloadWidget(const URL&); void did_progress(Optional total_size, u32 downloaded_size); void did_finish(bool success); URL m_url; String m_destination_path; RefPtr m_download; RefPtr m_progressbar; RefPtr m_progress_label; RefPtr m_cancel_button; RefPtr m_close_button; RefPtr m_close_on_finish_checkbox; RefPtr m_browser_image; OwnPtr m_output_file_stream; Core::ElapsedTimer m_elapsed_timer; }; }