OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ui/ozone/public/input_controller.h" | 5 #include "ui/ozone/public/input_controller.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" |
10 | 11 |
11 namespace ui { | 12 namespace ui { |
12 | 13 |
13 namespace { | 14 namespace { |
14 | 15 |
15 class StubInputController : public InputController { | 16 class StubInputController : public InputController { |
16 public: | 17 public: |
17 StubInputController(); | 18 StubInputController(); |
18 ~StubInputController() override; | 19 ~StubInputController() override; |
19 | 20 |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 } | 120 } |
120 | 121 |
121 void StubInputController::SetPrimaryButtonRight(bool right) { | 122 void StubInputController::SetPrimaryButtonRight(bool right) { |
122 } | 123 } |
123 | 124 |
124 void StubInputController::SetTapToClickPaused(bool state) { | 125 void StubInputController::SetTapToClickPaused(bool state) { |
125 } | 126 } |
126 | 127 |
127 void StubInputController::GetTouchDeviceStatus( | 128 void StubInputController::GetTouchDeviceStatus( |
128 const GetTouchDeviceStatusReply& reply) { | 129 const GetTouchDeviceStatusReply& reply) { |
129 reply.Run(scoped_ptr<std::string>(new std::string)); | 130 reply.Run(std::unique_ptr<std::string>(new std::string)); |
130 } | 131 } |
131 | 132 |
132 void StubInputController::GetTouchEventLog(const base::FilePath& out_dir, | 133 void StubInputController::GetTouchEventLog(const base::FilePath& out_dir, |
133 const GetTouchEventLogReply& reply) { | 134 const GetTouchEventLogReply& reply) { |
134 reply.Run(make_scoped_ptr(new std::vector<base::FilePath>)); | 135 reply.Run(base::WrapUnique(new std::vector<base::FilePath>)); |
135 } | 136 } |
136 | 137 |
137 void StubInputController::SetInternalTouchpadEnabled(bool enabled) { | 138 void StubInputController::SetInternalTouchpadEnabled(bool enabled) { |
138 } | 139 } |
139 | 140 |
140 bool StubInputController::IsInternalTouchpadEnabled() const { | 141 bool StubInputController::IsInternalTouchpadEnabled() const { |
141 return false; | 142 return false; |
142 } | 143 } |
143 | 144 |
144 void StubInputController::SetTouchscreensEnabled(bool enabled) {} | 145 void StubInputController::SetTouchscreensEnabled(bool enabled) {} |
145 | 146 |
146 void StubInputController::SetInternalKeyboardFilter( | 147 void StubInputController::SetInternalKeyboardFilter( |
147 bool enable_filter, | 148 bool enable_filter, |
148 std::vector<DomCode> allowed_keys) { | 149 std::vector<DomCode> allowed_keys) { |
149 } | 150 } |
150 | 151 |
151 } // namespace | 152 } // namespace |
152 | 153 |
153 scoped_ptr<InputController> CreateStubInputController() { | 154 std::unique_ptr<InputController> CreateStubInputController() { |
154 return make_scoped_ptr(new StubInputController); | 155 return base::WrapUnique(new StubInputController); |
155 } | 156 } |
156 | 157 |
157 } // namespace ui | 158 } // namespace ui |
OLD | NEW |