#include "third_party/blink/renderer/modules/service_worker/service_worker_window_client.h"
#include "base/memory/scoped_refptr.h"
#include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/renderer/bindings/core/v8/callback_promise_adapter.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/messaging/message_port.h"
#include "third_party/blink/renderer/core/page/page_hidden_state.h"
#include "third_party/blink/renderer/core/workers/worker_location.h"
#include "third_party/blink/renderer/modules/service_worker/service_worker_error.h"
#include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h"
#include "third_party/blink/renderer/platform/bindings/v8_throw_exception.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
namespace {
void DidFocus(ScriptPromiseResolver<ServiceWorkerWindowClient>* resolver,
mojom::blink::ServiceWorkerClientInfoPtr client) { … }
void DidNavigateOrOpenWindow(
ScriptPromiseResolver<IDLNullable<ServiceWorkerWindowClient>>* resolver,
bool success,
mojom::blink::ServiceWorkerClientInfoPtr info,
const String& error_msg) { … }
}
ServiceWorkerWindowClient::ResolveWindowClientCallback
ServiceWorkerWindowClient::CreateResolveWindowClientCallback(
ScriptPromiseResolver<IDLNullable<ServiceWorkerWindowClient>>* resolver) { … }
ServiceWorkerWindowClient::ServiceWorkerWindowClient(
const mojom::blink::ServiceWorkerClientInfo& info)
: … { … }
ServiceWorkerWindowClient::~ServiceWorkerWindowClient() = default;
String ServiceWorkerWindowClient::visibilityState() const { … }
ScriptPromise<ServiceWorkerWindowClient> ServiceWorkerWindowClient::focus(
ScriptState* script_state) { … }
ScriptPromise<IDLNullable<ServiceWorkerWindowClient>>
ServiceWorkerWindowClient::navigate(ScriptState* script_state,
const String& url) { … }
void ServiceWorkerWindowClient::Trace(Visitor* visitor) const { … }
}