blob: 30bb45955a27c2f4e73c5ae677a8ed9a6137aae8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
// 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/compiler_specific.h"
#include "base/logging.h"
namespace ui {
namespace {
class StubInputController : public InputController {
public:
StubInputController();
~StubInputController() override;
// InputController:
bool HasMouse() override;
bool HasTouchpad() override;
bool IsCapsLockEnabled() override;
void SetCapsLockEnabled(bool enabled) override;
void SetNumLockEnabled(bool enabled) override;
bool IsAutoRepeatEnabled() override;
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 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 SetTapToClickPaused(bool state) override;
void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override;
void GetTouchEventLog(const base::FilePath& out_dir,
const GetTouchEventLogReply& reply) override;
void DisableInternalTouchpad() override;
void EnableInternalTouchpad() override;
void DisableInternalKeyboardExceptKeys(
scoped_ptr<std::set<DomCode>> excepted_keys) override;
void EnableInternalKeyboard() override;
private:
DISALLOW_COPY_AND_ASSIGN(StubInputController);
};
StubInputController::StubInputController() {
}
StubInputController::~StubInputController() {
}
bool StubInputController::HasMouse() {
NOTIMPLEMENTED();
return false;
}
bool StubInputController::HasTouchpad() {
NOTIMPLEMENTED();
return false;
}
bool StubInputController::IsCapsLockEnabled() {
return false;
}
void StubInputController::SetCapsLockEnabled(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetNumLockEnabled(bool enabled) {
NOTIMPLEMENTED();
}
bool StubInputController::IsAutoRepeatEnabled() {
return true;
}
void StubInputController::SetAutoRepeatEnabled(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetAutoRepeatRate(const base::TimeDelta& delay,
const base::TimeDelta& interval) {
NOTIMPLEMENTED();
}
void StubInputController::GetAutoRepeatRate(base::TimeDelta* delay,
base::TimeDelta* interval) {
NOTIMPLEMENTED();
}
void StubInputController::SetTouchpadSensitivity(int value) {
NOTIMPLEMENTED();
}
void StubInputController::SetTapToClick(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetThreeFingerClick(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetTapDragging(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetNaturalScroll(bool enabled) {
NOTIMPLEMENTED();
}
void StubInputController::SetMouseSensitivity(int value) {
NOTIMPLEMENTED();
}
void StubInputController::SetPrimaryButtonRight(bool right) {
NOTIMPLEMENTED();
}
void StubInputController::SetTapToClickPaused(bool state) {
NOTIMPLEMENTED();
}
void StubInputController::GetTouchDeviceStatus(
const GetTouchDeviceStatusReply& reply) {
reply.Run(scoped_ptr<std::string>(new std::string));
}
void StubInputController::GetTouchEventLog(const base::FilePath& out_dir,
const GetTouchEventLogReply& reply) {
reply.Run(
scoped_ptr<std::vector<base::FilePath>>(new std::vector<base::FilePath>));
}
void StubInputController::DisableInternalTouchpad() {
NOTIMPLEMENTED();
}
void StubInputController::EnableInternalTouchpad() {
NOTIMPLEMENTED();
}
void StubInputController::DisableInternalKeyboardExceptKeys(
scoped_ptr<std::set<DomCode>> excepted_keys) {
NOTIMPLEMENTED();
}
void StubInputController::EnableInternalKeyboard() {
NOTIMPLEMENTED();
}
} // namespace
scoped_ptr<InputController> CreateStubInputController() {
return make_scoped_ptr(new StubInputController);
}
} // namespace ui
|