blob: 3015aa6808a4e2c6e95c4c2aae560048d7a44e03 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/blink/renderer/core/dom/events/event.h"
#include "third_party/blink/renderer/core/event_interface_names.h"
namespace blink {
class MojoHandle;
class MojoInterfaceRequestEventInit;
// An event dispatched to a MojoInterfaceInterceptor when its frame sends an
// outgoing request for the interface it was configured to intercept. The event
// includes the intercepted MojoHandle of the request pipe, which a listener may
// use to bind the request to e.g. a mock interface implementation.
class MojoInterfaceRequestEvent final : public Event {
~MojoInterfaceRequestEvent() override;
static MojoInterfaceRequestEvent* Create(MojoHandle* handle) {
return MakeGarbageCollected<MojoInterfaceRequestEvent>(handle);
static MojoInterfaceRequestEvent* Create(
const AtomicString& type,
const MojoInterfaceRequestEventInit* initializer) {
return MakeGarbageCollected<MojoInterfaceRequestEvent>(type, initializer);
explicit MojoInterfaceRequestEvent(MojoHandle*);
MojoInterfaceRequestEvent(const AtomicString& type,
const MojoInterfaceRequestEventInit*);
MojoHandle* handle() const { return handle_; }
const AtomicString& InterfaceName() const override {
return event_interface_names::kMojoInterfaceRequestEvent;
void Trace(blink::Visitor*) override;
Member<MojoHandle> handle_;
} // namespace blink