chromium/ui/events/event_rewriter.cc

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

#include "ui/events/event_rewriter.h"

#include <utility>

#include "base/check_op.h"
#include "base/notreached.h"
#include "ui/events/event_rewriter_continuation.h"
#include "ui/events/event_source.h"
#include "ui/events/event_target.h"
#include "ui/events/platform_event.h"

namespace ui {

namespace {

ui::EventDispatchDetails DispatcherDestroyed() {}

}  // anonymous namespace

// Temporary fallback implementation, in terms of the old API,
// factored out of EventSource::SendEventToSinkFromRewriter().
// TODO(kpschoedel): Remove along with old API.
EventDispatchDetails EventRewriter::RewriteEvent(
    const Event& event,
    const Continuation continuation) {}

// Temporary default implementation of the old API, so that subclasses'
// implementations can be removed.
// TODO(kpschoedel): Remove old API.
EventRewriteStatus EventRewriter::RewriteEvent(
    const Event& event,
    std::unique_ptr<Event>* rewritten_event) {}

bool EventRewriter::SupportsNonRootLocation() const {}

// Temporary default implementation of the old API, so that subclasses'
// implementations can be removed.
// TODO(kpschoedel): Remove old API.
EventRewriteStatus EventRewriter::NextDispatchEvent(
    const Event& last_event,
    std::unique_ptr<Event>* new_event) {}

// TODO(kpschoedel): Remove old API.
EventDispatchDetails EventRewriter::SendEventToEventSource(EventSource* source,
                                                           Event* event) const {}

EventDispatchDetails EventRewriter::SendEvent(const Continuation continuation,
                                              const Event* event) {}

EventDispatchDetails EventRewriter::SendEventFinally(
    const Continuation continuation,
    const Event* event) {}

EventDispatchDetails EventRewriter::DiscardEvent(
    const Continuation continuation) {}

void EventRewriter::SetEventTarget(Event& event, EventTarget* target) {}

#if BUILDFLAG(IS_CHROMEOS)
void EventRewriter::SetNativeEvent(Event& event,
                                   const PlatformEvent& native_event) {
  event.native_event_ = native_event;
}
#endif

}  // namespace ui