blob: bbeb84dccbfbdb92bc911e52035f158eb2165994 [file] [log] [blame]
Elliot Glaysheraa763fa2017-09-15 19:02:141// Copyright 2017 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/events/system_input_injector.h"
6
Elliot Glaysheraa763fa2017-09-15 19:02:147
8namespace ui {
9
10namespace {
11SystemInputInjectorFactory* override_factory_ = nullptr;
Elliot Glaysheraa763fa2017-09-15 19:02:1412} // namespace
13
Elliot Glaysher71afb0ec2017-09-19 21:51:3314void SetSystemInputInjectorFactory(SystemInputInjectorFactory* factory) {
Elliot Glaysheraa763fa2017-09-15 19:02:1415 DCHECK(!factory || !override_factory_);
16 override_factory_ = factory;
17}
18
Elliot Glaysheraa763fa2017-09-15 19:02:1419SystemInputInjectorFactory* GetSystemInputInjectorFactory() {
Elliot Glaysher71afb0ec2017-09-19 21:51:3320 return override_factory_;
Elliot Glaysheraa763fa2017-09-15 19:02:1421}
22
23} // namespace ui