blob: bd83d723547bf426dfeb88953075c1afb8e685b3 [file] [log] [blame]
// Copyright 2019 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 "base/component_export.h"
#include "base/macros.h"
#include "ui/base/prediction/input_filter.h"
namespace ui {
// Empty filter is a fake filter. Always returns the same input position as
// the filtered position. Mainly used for testing purpose.
class COMPONENT_EXPORT(UI_BASE_PREDICTION) EmptyFilter : public InputFilter {
explicit EmptyFilter();
~EmptyFilter() override;
// Filters the position sent to the filter at a specific timestamp.
// Returns true if the value is filtered, false otherwise.
bool Filter(const base::TimeTicks& timestamp,
gfx::PointF* position) const override;
// Returns the name of the filter
const char* GetName() const override;
// Returns a copy of the filter.
InputFilter* Clone() override;
// Reset the filter to its initial state
void Reset() override;
} // namespace ui