Add ICU message format support
[chromium-blink-merge.git] / ui / ozone / public / input_controller.cc
blobed13b99b5f8c0893f92eb5b6b75d220ed4cfc194
1 // Copyright 2014 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.
5 #include "ui/ozone/public/input_controller.h"
7 #include "base/compiler_specific.h"
8 #include "base/logging.h"
10 namespace ui {
12 namespace {
14 class StubInputController : public InputController {
15 public:
16 StubInputController();
17 ~StubInputController() override;
19 // InputController:
20 bool HasMouse() override;
21 bool HasTouchpad() override;
22 bool IsCapsLockEnabled() override;
23 void SetCapsLockEnabled(bool enabled) override;
24 void SetNumLockEnabled(bool enabled) override;
25 bool IsAutoRepeatEnabled() override;
26 void SetAutoRepeatEnabled(bool enabled) override;
27 void SetAutoRepeatRate(const base::TimeDelta& delay,
28 const base::TimeDelta& interval) override;
29 void GetAutoRepeatRate(base::TimeDelta* delay,
30 base::TimeDelta* interval) override;
31 void SetTouchEventLoggingEnabled(bool enabled) override;
32 void SetTouchpadSensitivity(int value) override;
33 void SetTapToClick(bool enabled) override;
34 void SetThreeFingerClick(bool enabled) override;
35 void SetTapDragging(bool enabled) override;
36 void SetNaturalScroll(bool enabled) override;
37 void SetMouseSensitivity(int value) override;
38 void SetPrimaryButtonRight(bool right) override;
39 void SetTapToClickPaused(bool state) override;
40 void GetTouchDeviceStatus(const GetTouchDeviceStatusReply& reply) override;
41 void GetTouchEventLog(const base::FilePath& out_dir,
42 const GetTouchEventLogReply& reply) override;
43 void SetInternalTouchpadEnabled(bool enabled) override;
44 void SetInternalKeyboardFilter(bool enable_filter,
45 std::vector<DomCode> allowed_keys) override;
47 private:
48 DISALLOW_COPY_AND_ASSIGN(StubInputController);
51 StubInputController::StubInputController() {
54 StubInputController::~StubInputController() {
57 bool StubInputController::HasMouse() {
58 return false;
61 bool StubInputController::HasTouchpad() {
62 return false;
65 bool StubInputController::IsCapsLockEnabled() {
66 return false;
69 void StubInputController::SetCapsLockEnabled(bool enabled) {
72 void StubInputController::SetNumLockEnabled(bool enabled) {
75 bool StubInputController::IsAutoRepeatEnabled() {
76 return true;
79 void StubInputController::SetAutoRepeatEnabled(bool enabled) {
82 void StubInputController::SetAutoRepeatRate(const base::TimeDelta& delay,
83 const base::TimeDelta& interval) {
86 void StubInputController::GetAutoRepeatRate(base::TimeDelta* delay,
87 base::TimeDelta* interval) {
90 void StubInputController::SetTouchpadSensitivity(int value) {
93 void StubInputController::SetTouchEventLoggingEnabled(bool enabled) {
94 NOTIMPLEMENTED();
97 void StubInputController::SetTapToClick(bool enabled) {
100 void StubInputController::SetThreeFingerClick(bool enabled) {
103 void StubInputController::SetTapDragging(bool enabled) {
106 void StubInputController::SetNaturalScroll(bool enabled) {
109 void StubInputController::SetMouseSensitivity(int value) {
112 void StubInputController::SetPrimaryButtonRight(bool right) {
115 void StubInputController::SetTapToClickPaused(bool state) {
118 void StubInputController::GetTouchDeviceStatus(
119 const GetTouchDeviceStatusReply& reply) {
120 reply.Run(scoped_ptr<std::string>(new std::string));
123 void StubInputController::GetTouchEventLog(const base::FilePath& out_dir,
124 const GetTouchEventLogReply& reply) {
125 reply.Run(make_scoped_ptr(new std::vector<base::FilePath>));
128 void StubInputController::SetInternalTouchpadEnabled(bool enabled) {
131 void StubInputController::SetInternalKeyboardFilter(
132 bool enable_filter,
133 std::vector<DomCode> allowed_keys) {
136 } // namespace
138 scoped_ptr<InputController> CreateStubInputController() {
139 return make_scoped_ptr(new StubInputController);
142 } // namespace ui