blob: 4ba1521c5308ef977208570a01758ca1a1ddbe90 [file] [log] [blame]
// Copyright 2014 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 "ui/ozone/public/input_controller.h"
#include "base/callback.h"
#include "base/logging.h"
#include "base/macros.h"
namespace ui {
namespace {
class StubInputController : public InputController {
public:
StubInputController() = default;
~StubInputController() override = default;
// InputController:
bool HasMouse() override { return false; }
bool HasTouchpad() override { return false; }
bool IsCapsLockEnabled() override { return false; }
void SetCapsLockEnabled(bool enabled) override {}
void SetNumLockEnabled(bool enabled) override {}
bool IsAutoRepeatEnabled() override { return true; }
void SetAutoRepeatEnabled(bool enabled) override {}
void SetAutoRepeatRate(const base::TimeDelta& delay,
const base::TimeDelta& interval) override {}
void GetAutoRepeatRate(base::TimeDelta* delay,
base::TimeDelta* interval) override {}
void SetCurrentLayoutByName(const std::string& layout_name) override {}
void SetTouchEventLoggingEnabled(bool enabled) override {
NOTIMPLEMENTED_LOG_ONCE();
}
void SetTouchpadSensitivity(int value) override {}
void SetTapToClick(bool enabled) override {}
void SetThreeFingerClick(bool enabled) override {}
void SetTapDragging(bool enabled) override {}
void SetNaturalScroll(bool enabled) override {}
void SetMouseSensitivity(int value) override {}
void SetPrimaryButtonRight(bool right) override {}
void SetMouseReverseScroll(bool enabled) override {}
void SetTapToClickPaused(bool state) override {}
void GetTouchDeviceStatus(GetTouchDeviceStatusReply reply) override {
std::move(reply).Run(std::string());
}
void GetTouchEventLog(const base::FilePath& out_dir,
GetTouchEventLogReply reply) override {
std::move(reply).Run(std::vector<base::FilePath>());
}
void SetInternalTouchpadEnabled(bool enabled) override {}
bool IsInternalTouchpadEnabled() const override { return false; }
void SetTouchscreensEnabled(bool enabled) override {}
void SetInternalKeyboardFilter(bool enable_filter,
std::vector<DomCode> allowed_keys) override {}
private:
DISALLOW_COPY_AND_ASSIGN(StubInputController);
};
} // namespace
std::unique_ptr<InputController> CreateStubInputController() {
return std::make_unique<StubInputController>();
}
} // namespace ui