chromium/chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.h

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

#ifndef CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_TEST_ISOLATED_WEB_APP_BUILDER_H_
#define CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_TEST_ISOLATED_WEB_APP_BUILDER_H_

#include <map>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

#include "base/files/file_path.h"
#include "base/files/scoped_temp_file.h"
#include "base/memory/scoped_refptr.h"
#include "base/types/expected.h"
#include "base/version.h"
#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h"
#include "components/web_package/signed_web_bundles/signed_web_bundle_id.h"
#include "components/web_package/test_support/signed_web_bundles/web_bundle_signer.h"
#include "net/http/http_status_code.h"
#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom-forward.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-forward.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-forward.h"
#include "ui/gfx/geometry/size.h"

class Profile;
class SkBitmap;

namespace net::test_server {
class EmbeddedTestServer;
class HttpResponse;
struct HttpRequest;
}  // namespace net::test_server

namespace net {
EmbeddedTestServer;
class HttpResponseHeaders;
}  // namespace net

namespace url {
class Origin;
}  // namespace url

namespace web_app {

// A builder for a subset of the Web Manifest spec.
class ManifestBuilder {};

class BundledIsolatedWebApp {};

class ScopedBundledIsolatedWebApp : public BundledIsolatedWebApp {};

class ScopedProxyIsolatedWebApp {};

// A builder for Isolated Web Apps that supports adding resources from disk
// (typically from //chrome/test/data), or from strings provided by the test,
// and allows callers to create a dev proxy server or signed web bundle file
// containing the configured resources.
//
// If multiple resources are registered for the same path, the latest
// registration will "win". This allows callers to for example add a test app
// from a directory with `AddFolderFromDisk`, and then override a specific
// file with a subsequent call to `AddResource`.
class IsolatedWebAppBuilder {};

}  // namespace web_app

#endif  // CHROME_BROWSER_WEB_APPLICATIONS_ISOLATED_WEB_APPS_TEST_ISOLATED_WEB_APP_BUILDER_H_