summaryrefslogblamecommitdiffstats
path: root/src/core/frontend/applets/web_browser.cpp
blob: 27c7086be175345a4e10cc792bd26017d604c544 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12

                                                               









                                                              
                                               
                                                                               
                                                                                           


                                                                                               
                                                                                     

 
                                                  
                                    






                                                                                                  
                             
// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later

#include "common/logging/log.h"
#include "core/frontend/applets/web_browser.h"

namespace Core::Frontend {

WebBrowserApplet::~WebBrowserApplet() = default;

DefaultWebBrowserApplet::~DefaultWebBrowserApplet() = default;

void DefaultWebBrowserApplet::OpenLocalWebPage(
    const std::string& local_url, std::function<void()> extract_romfs_callback,
    std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const {
    LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open local web page at {}",
                local_url);

    callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
}

void DefaultWebBrowserApplet::OpenExternalWebPage(
    const std::string& external_url,
    std::function<void(Service::AM::Applets::WebExitReason, std::string)> callback) const {
    LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open external web page at {}",
                external_url);

    callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
}

} // namespace Core::Frontend